Prevent rubber-banding in Telemetry Table filter input (#7248)

* should debounce the filtering of the telemetry, not the setting of the input

* add some laggy typing to check for debouncing issues

* revert test
This commit is contained in:
Scott Bell 2023-11-28 17:39:34 +01:00 committed by GitHub
parent 28bfc90036
commit 415b65237b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -477,7 +477,7 @@ export default {
}
},
created() {
this.filterChanged = _.debounce(this.filterChanged, 500);
this.filterTelemetry = _.debounce(this.filterTelemetry, 500);
},
mounted() {
this.csvExporter = new CSVExporter();
@ -667,8 +667,7 @@ export default {
this.headersHolderEl.scrollLeft = this.scrollable.scrollLeft;
}
},
filterChanged(columnKey, newFilterValue) {
this.filters[columnKey] = newFilterValue;
filterTelemetry(columnKey) {
if (this.enableRegexSearch[columnKey]) {
if (this.isCompleteRegex(this.filters[columnKey])) {
this.table.tableRows.setColumnRegexFilter(
@ -684,6 +683,10 @@ export default {
this.setHeight();
},
filterChanged(columnKey, newFilterValue) {
this.filters[columnKey] = newFilterValue;
this.filterTelemetry(columnKey);
},
clearFilter(columnKey) {
this.filters[columnKey] = '';
this.table.tableRows.setColumnFilter(columnKey, '');