Skip to content

Commit 237dafd

Browse files
committed
Update debounce variable and delay to align with updates from other versions of the integration
1 parent d2de54f commit 237dafd

File tree

1 file changed

+7
-4
lines changed
  • src/Umbraco.Cms.Integrations.Crm.ActiveCampaign/App_Plugins/UmbracoCms.Integrations/Crm/ActiveCampaign/js

1 file changed

+7
-4
lines changed

src/Umbraco.Cms.Integrations.Crm.ActiveCampaign/App_Plugins/UmbracoCms.Integrations/Crm/ActiveCampaign/js/formpicker.controller.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,15 @@
6767
editorService.open(options);
6868
};
6969

70-
let timer;
70+
let filterTimeout;
7171
vm.filterForms = () => {
72-
if (timer) {
73-
clearTimeout(timer);
72+
if (filterTimeout) {
73+
clearTimeout(filterTimeout);
7474
}
75-
timer = setTimeout(() => { loadForms(vm.pagination.pageNumber, vm.searchTerm); }, 500);
75+
filterTimeout = setTimeout(() => {
76+
vm.pagination.pageNumber = 1;
77+
loadForms(vm.pagination.pageNumber, vm.searchTerm);
78+
}, 2000);
7679
}
7780

7881
function getFormDetails(id) {

0 commit comments

Comments
 (0)