[Feature]: ID for Combobox Option whose value is not rendered
Library
~~React Northstar / v0 (@fluentui/react-northstar)~~ v9
Describe the feature that you would like added
While implementing a Combobox, the array of options is formatted using OptionProps as either:
{ value: string; text: string } or
{ value: string; children: string }
The value property is used to render the input and the text/children property is used to render the dropdown option. Both of these properties are visible to the user and so must be localized. However, if you want to log telemetry for the option selected, there is no static value returned through onOptionSelect that can be used to consistently log an un-localized value.
The request is for OptionProps to be able to accept a static, unrendered property that can be retrieved from onOptionSelect to consistently identify the option selected regardless of language used.
Have you discussed this feature with our team
No response
Additional context
No response
Validations
- [X] Check that there isn't already an issue that requests the same feature to avoid creating a duplicate.
Priority
Normal
The request is for
OptionPropsto be able to accept a static, unrendered property that can be retrieved fromonOptionSelectto consistently identify the option selected regardless of language used.
value should be used for this purpose: value acts like id for an option, text/children - displayed text.
Please check controlled example, https://react.fluentui.dev/?path=/docs/components-combobox--docs#controlled.