Skip to content

Commit

Permalink
fix: open correct selected item in slash menu
Browse files Browse the repository at this point in the history
  • Loading branch information
m-risto committed Sep 17, 2024
1 parent e73afff commit a221934
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,10 @@ export class BnaSuggestionsMenuComponent implements OnInit, OnDestroy {

insertSelectedBlock() {
const editor = this.ngxBlockNoteService.editor();
const item = this.filteredSlashMenuItems[this.selectedIndex];
editor.suggestionMenus.closeMenu();
editor.suggestionMenus.clearQuery();
this.filteredSlashMenuItems[this.selectedIndex].onItemClick();
item.onItemClick();
this.selectedIndex = 0;
}

Expand Down

0 comments on commit a221934

Please sign in to comment.