diff --git a/client/src/views/modals/related-list.js b/client/src/views/modals/related-list.js index 0c343a334e..fda213c620 100644 --- a/client/src/views/modals/related-list.js +++ b/client/src/views/modals/related-list.js @@ -436,13 +436,19 @@ class RelatedListModalView extends ModalView { } const fetch = () => { - // Timeout to make notify work. - setTimeout(() => { + this.whenRendered().then(() => { Espo.Ui.notify(' ... '); this.collection.fetch() .then(() => Espo.Ui.notify(false)); - }, 1); + }); + // Timeout to make notify work. + /*setTimeout(() => { + Espo.Ui.notify(' ... '); + + this.collection.fetch() + .then(() => Espo.Ui.notify(false)); + }, 1);*/ }; if (this.options.forceSelectAllAttributes || this.forceSelectAllAttributes) { diff --git a/client/src/views/modals/select-records.js b/client/src/views/modals/select-records.js index 15c28815b9..d2dddc94ea 100644 --- a/client/src/views/modals/select-records.js +++ b/client/src/views/modals/select-records.js @@ -297,13 +297,19 @@ class SelectRecordsModalView extends ModalView { } const fetch = () => { - // Timeout to make notify work. - setTimeout(() => { + this.whenRendered().then(() => { Espo.Ui.notify(' ... '); this.collection.fetch() .then(() => Espo.Ui.notify(false)); - }, 1); + }); + // Timeout to make notify work. + /*setTimeout(() => { + Espo.Ui.notify(' ... '); + + this.collection.fetch() + .then(() => Espo.Ui.notify(false)); + }, 1);*/ }; if (this.options.forceSelectAllAttributes || this.forceSelectAllAttributes) {