related records modal fetch when rendered

This commit is contained in:
Yuri Kuznetsov
2023-10-26 13:19:43 +03:00
parent 27b9e28e20
commit 342764e9ff
2 changed files with 18 additions and 6 deletions
+9 -3
View File
@@ -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) {
+9 -3
View File
@@ -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) {