File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
src/Umbraco.Cms.Integrations.Crm.ActiveCampaign/Client/src/modal Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,8 @@ export default class ActiveCampaignFormsModalElement
3232 @state ( )
3333 _searchQuery = "" ;
3434
35+ #filterTimeout?: NodeJS . Timeout ;
36+
3537 constructor ( ) {
3638 super ( ) ;
3739
@@ -83,7 +85,15 @@ export default class ActiveCampaignFormsModalElement
8385 query = query . toLowerCase ( ) ;
8486 this . _searchQuery = query ;
8587
86- await this . #loadForms( this . _currentPageNumber , this . _searchQuery ) ;
88+ // Clear existing timeout
89+ if ( this . #filterTimeout) {
90+ clearTimeout ( this . #filterTimeout) ;
91+ }
92+
93+ this . #filterTimeout = setTimeout ( async ( ) => {
94+ this . _currentPageNumber = 1 ;
95+ await this . #loadForms( this . _currentPageNumber , this . _searchQuery ) ;
96+ } , 2000 ) ;
8797 }
8898
8999 async #onPageChange( event : UUIPaginationEvent ) {
You can’t perform that action at this time.
0 commit comments