js: Suspend auto refresh once `search-bar` enrichment opens its editor

This commit is contained in:
Johannes Meyer 2021-02-25 09:13:33 +01:00
parent 1f29c4a2fe
commit f44ea884bd
1 changed files with 10 additions and 0 deletions

View File

@ -29,6 +29,16 @@
this.on('beforerender', '.container', this.onBeforeRender, this); this.on('beforerender', '.container', this.onBeforeRender, this);
this.on('rendered', '.container', this.onRendered, this); this.on('rendered', '.container', this.onRendered, this);
/**
* Listen for events emitted by the SearchBar widget
*/
this.on('editor-open', '.container', function () {
this.dataset.suspendAutorefresh = '';
});
this.on('editor-close', '.container', function () {
delete this.dataset.suspendAutorefresh;
});
/** /**
* Enriched inputs * Enriched inputs
* *