mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
Add a one second delay between query input and filtering history
This commit is contained in:
parent
aed26f8c1e
commit
119dd06ea8
2 changed files with 12 additions and 1 deletions
|
@ -216,6 +216,17 @@ controllers.controller("historyController", function($scope, $http, $timeout) {
|
||||||
$scope.historyItems.splice(index, 1);
|
$scope.historyItems.splice(index, 1);
|
||||||
})};
|
})};
|
||||||
|
|
||||||
|
var queryInputTimeout = null;
|
||||||
|
$scope.$watch("queryInput", function() {
|
||||||
|
if (queryInputTimeout){
|
||||||
|
$timeout.cancel(queryInputTimeout);
|
||||||
|
}
|
||||||
|
|
||||||
|
queryInputTimeout = $timeout(function() {
|
||||||
|
$scope.query = $scope.queryInput;
|
||||||
|
}, 1000);
|
||||||
|
});
|
||||||
|
|
||||||
$scope.fetchHistory();
|
$scope.fetchHistory();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div id="table_filter_container">
|
<div id="table_filter_container">
|
||||||
<span ng-show="loadingText.length > 0"> {{ loadingText }} </span>
|
<span ng-show="loadingText.length > 0"> {{ loadingText }} </span>
|
||||||
<input id="table_filter_text_box" class="filter_text_box text_box_transient" placeholder="Filter" ng-model="query">
|
<input id="table_filter_text_box" class="filter_text_box text_box_transient" placeholder="Filter" ng-model="queryInput">
|
||||||
</div>
|
</div>
|
||||||
<table class="data_table">
|
<table class="data_table">
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
Loading…
Reference in a new issue