Skip to content

Commit

Permalink
fix: default value in ComboBox
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub Sobolewski committed Sep 13, 2023
1 parent 0ee96aa commit d4412b1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion inst/www/shiny.fluent/shiny-fluent.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions js/src/inputs.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ export const ColorPicker = InputAdapter(Fluent.ColorPicker, (value, setValue) =>
}), { policy: debounce, delay: 250 });

export const ComboBox = InputAdapter(Fluent.ComboBox, (value, setValue, props) => ({
selectedKeys: value,
selectedKey: value,
onChange: (event, option, index, text) => {
const newOption = option || (text ? { text, key: text, selected: true } : null);
if (props.multiSelect) {
Expand Down

0 comments on commit d4412b1

Please sign in to comment.