From 23278f54cb3d54d24a1dea869e0bab892df104da Mon Sep 17 00:00:00 2001 From: zadam Date: Mon, 17 Jul 2023 22:41:37 +0200 Subject: [PATCH] force refresh before activating the attribute detail dialog, fixes #4077 --- .../app/widgets/attribute_widgets/attribute_editor.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/public/app/widgets/attribute_widgets/attribute_editor.js b/src/public/app/widgets/attribute_widgets/attribute_editor.js index 8ded708f8..225ba1f38 100644 --- a/src/public/app/widgets/attribute_widgets/attribute_editor.js +++ b/src/public/app/widgets/attribute_widgets/attribute_editor.js @@ -228,15 +228,19 @@ export default class AttributeEditorWidget extends NoteContextAwareWidget { } // triggered from keyboard shortcut - addNewLabelEvent({ntxId}) { + async addNewLabelEvent({ntxId}) { if (this.isNoteContext(ntxId)) { + await this.refresh(); + this.handleAddNewAttributeCommand('addNewLabel'); } } // triggered from keyboard shortcut - addNewRelationEvent({ntxId}) { + async addNewRelationEvent({ntxId}) { if (this.isNoteContext(ntxId)) { + await this.refresh(); + this.handleAddNewAttributeCommand('addNewRelation'); } }