fluentui
fluentui copied to clipboard
[Feature]: defaultSelectedKey on ComboBox
Library
React Components / v9 (@fluentui/react-components)
Describe the feature that you would like added
ComboBox currently only supports a defaultSelectedKey. It would be useful to have a multi-select equivalent, something like defaultSelectedKeys.
I wish to be able to set the initial selections for a multi select combo box using this attribute.
Have you discussed this feature with our team
No response
Additional context
I think this feature is just expected. Other Fluent components support it, so it's strange we don't have it on ComboBox.
Validations
- [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
I’ve added this to our backlog for review and the teams we will review the priority of the request at a later stage for future planning.
defaultSelectedOptions={["Cat", "Fish"]}
is already a valid prop. It should work for this use case
https://codesandbox.io/s/bold-ramanujan-5vov62?file=/example.tsx:755-795
This issue has been marked as being beyond the support scope of Fluent UI's issues board. It will now be closed automatically for house-keeping purposes.