From 684492f2c50f6b939aa989720795c057524e6ffa Mon Sep 17 00:00:00 2001 From: Martin Brennan Date: Wed, 29 May 2024 15:49:44 +1000 Subject: [PATCH] FIX: Admin setting search debounce losing characters (#27238) When typing slowly in the admin setting filter input, we were losing characters after the debounce. This commit changes to use native instead of the ember component similar to the change in bfd6a7b86c094ea41617bcb3477353baf08b50a9 c.f. https://meta.discourse.org/t/settings-filter-loses-some-of-the-letters-you-entered/305201 --- .../admin-plugin-filtered-site-settings.gjs | 24 +++++++++---------- .../admin-site-settings-filter-controls.gjs | 19 +++++++++------ .../admin-plugins-show-settings.js | 2 +- 3 files changed, 25 insertions(+), 20 deletions(-) diff --git a/app/assets/javascripts/admin/addon/components/admin-plugin-filtered-site-settings.gjs b/app/assets/javascripts/admin/addon/components/admin-plugin-filtered-site-settings.gjs index a367e47900e..07cbeb17ef4 100644 --- a/app/assets/javascripts/admin/addon/components/admin-plugin-filtered-site-settings.gjs +++ b/app/assets/javascripts/admin/addon/components/admin-plugin-filtered-site-settings.gjs @@ -23,18 +23,6 @@ export default class AdminPluginFilteredSiteSettings extends Component { this.filterChanged({ filter: "", onlyOverridden: false }); } - filterSettings(filterData) { - this.args.onFilterChanged(filterData); - this.visibleSettings = this.siteSettingFilter.filterSettings( - filterData.filter, - { - includeAllCategory: false, - onlyOverridden: filterData.onlyOverridden, - } - )[0]?.siteSettings; - this.loading = false; - } - @action filterChanged(filterData) { this._debouncedOnChangeFilter(filterData); @@ -54,6 +42,18 @@ export default class AdminPluginFilteredSiteSettings extends Component { ); } + filterSettings(filterData) { + this.args.onFilterChanged(filterData); + this.visibleSettings = this.siteSettingFilter.filterSettings( + filterData.filter, + { + includeAllCategory: false, + onlyOverridden: filterData.onlyOverridden, + } + )[0]?.siteSettings; + this.loading = false; + } +