diff --git a/client/src/collections/note.js b/client/src/collections/note.js index 00f62ec88c..89920c4979 100644 --- a/client/src/collections/note.js +++ b/client/src/collections/note.js @@ -78,8 +78,7 @@ class NoteCollection extends Collection { return; } - model.set(item, {keepRowActions: true}); - + model.set(item); }); } diff --git a/client/src/views/record/row-actions/default.js b/client/src/views/record/row-actions/default.js index 39074aedd8..adaeeb85dd 100644 --- a/client/src/views/record/row-actions/default.js +++ b/client/src/views/record/row-actions/default.js @@ -52,6 +52,12 @@ class DefaultRowActionsView extends View { template = 'record/row-actions/default' + /** + * @private + * @type {boolean} + */ + menuIsShown = false + setup() { this.options.acl = this.options.acl || {}; this.scope = this.options.scope || this.model.entityType; @@ -69,11 +75,19 @@ class DefaultRowActionsView extends View { return; } + if (this.menuIsShown) { + this.once('menu-hidden', () => this.reRender()); + + return; + } + this.reRender(); }); } afterRender() { + this.menuIsShown = false; + const $dd = this.$el.find('button[data-toggle="dropdown"]').parent(); let isChecked = false; @@ -88,12 +102,17 @@ class DefaultRowActionsView extends View { } $el.addClass('active'); + + this.menuIsShown = true; }); $dd.on('hide.bs.dropdown', () => { if (!isChecked) { this.$el.closest('.list-row').removeClass('active'); } + + this.menuIsShown = false; + this.trigger('menu-hidden'); }); } diff --git a/client/src/views/stream/panel.js b/client/src/views/stream/panel.js index 40748e7c29..40fc7278f4 100644 --- a/client/src/views/stream/panel.js +++ b/client/src/views/stream/panel.js @@ -338,7 +338,7 @@ class PanelStreamView extends RelationshipPanelView { const model = this.collection.get(data.noteId); if (model) { - model.fetch({keepRowActions: true}) + model.fetch() .then(() => this.syncPinnedModel(model, true)); }