Skip to content

Commit

Permalink
Fix rending of quickpick buttons
Browse files Browse the repository at this point in the history
Ensure that  the Theia specific wrapper for the MonacoQuickPickItem properly forwards assignments of the "buttons" property to the wrapped item.

Fixes eclipse-theia#13076

Contributed on behalf of STMicroelectronics
  • Loading branch information
tortmayr committed Mar 8, 2024
1 parent 9ff0ced commit 96f5955
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/monaco/src/browser/monaco-quick-input-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,14 @@ class MonacoQuickPick<T extends QuickPickItem> extends MonacoQuickInput implemen
});
}

get buttons(): ReadonlyArray<IQuickInputButton> {
return this.wrapped.buttons;
}

set buttons(buttons: ReadonlyArray<IQuickInputButton>) {
this.wrapped.buttons = buttons;
}

set items(itemList: readonly (T | QuickPickSeparator)[]) {
// We need to store and apply the currently selected active items.
// Since monaco compares these items by reference equality, creating new wrapped items will unmark any active items.
Expand Down

0 comments on commit 96f5955

Please sign in to comment.