fix(util-registry): start setup instances and not all active instances

This commit is contained in:
Sarah Vaupel 2019-12-03 11:20:44 +01:00 committed by Gregor Kleen
parent 67e472fa5e
commit ddf94bf565
2 changed files with 6 additions and 4 deletions

View File

@ -48,13 +48,14 @@ export class UtilRegistry {
}
setupAll(scope) {
const setupInstances = this._registeredUtils.map((util) => this.setup(util, scope)).flat();
setupInstances.forEach((instance) => typeof instance.start === 'function' && instance.start());
if (DEBUG_MODE > 1) {
console.info('registered js utilities:');
console.table(this._registeredUtils);
console.info('setup js instances:');
console.table(setupInstances);
}
this._registeredUtils.forEach((util) => this.setup(util, scope));
this._activeUtilInstances.forEach((instance) => typeof instance.start === 'function' && instance.start());
}
setup(util, scope = document.body) {

View File

@ -216,6 +216,7 @@ export class AsyncTable {
this._tableFilterInputs.change.forEach((input) => {
input.addEventListener('change', () => {
//if (this._element.classList.contains(ASYNC_TABLE_LOADING_CLASS))
this._updateFromTableFilter(tableFilterForm);
});
});