mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-04 15:51:15 -03:00
Add a one second delay between query input and filtering history
This commit is contained in:
@@ -216,6 +216,17 @@ controllers.controller("historyController", function($scope, $http, $timeout) {
|
||||
$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();
|
||||
});
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div id="table_filter_container">
|
||||
<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>
|
||||
<table class="data_table">
|
||||
<tbody>
|
||||
|
||||
Reference in New Issue
Block a user