Library
React Components / v9 (@fluentui/react-components)
System Info
Are you reporting Accessibility issue?
None
Reproduction
see link of codesandbox in bug description
Bug Description
Actual Behavior
Native input has change event that fires on focus lose or Enter key. V8 Combobox has onChange callback that fires on the same cases. But there's no equivalent in v9 Combobox.
In this codesandbox with v8 and native input: https://codesandbox.io/s/sleepy-glitter-4rp64r?file=/src/index.tsx
- type 'abc' in v8 Combobox, click on the body, notice console log shows
onChange has been fired with value='abc'.
- type 'abc' in native input, click on the body, notice console log shows native change event has been fired.
But in v9 there's no equivalent callback. onOptionSelect/ onChange is not firing on focus lose: https://codesandbox.io/s/elated-gianmarco-rtm868?file=/example.tsx
Expected Behavior
Freeform combobox should have a callback that is equivalent to native change event that fires on focus lose or on Enter key.
It is not so straightforward to achieve this from user override.
Logs
No response
Requested priority
High
Reason for piority
I encountered this when using v9 Combobox to create TimePicker compat. It is achievable via recomposing (therefore not blocking piority). However I wonder if v9 Combobox intentionally omit this. If not it would be better to fix it on combobox, and if so what's the reason.
Products/sites affected
No response
Are you willing to submit a PR to fix?
no
Validations
Library
React Components / v9 (@fluentui/react-components)
System Info
Are you reporting Accessibility issue?
None
Reproduction
see link of codesandbox in bug description
Bug Description
Actual Behavior
Native input has change event that fires on focus lose or Enter key. V8 Combobox has onChange callback that fires on the same cases. But there's no equivalent in v9 Combobox.
In this codesandbox with v8 and native input: https://codesandbox.io/s/sleepy-glitter-4rp64r?file=/src/index.tsx
onChangehas been fired with value='abc'.But in v9 there's no equivalent callback.
onOptionSelect/onChangeis not firing on focus lose: https://codesandbox.io/s/elated-gianmarco-rtm868?file=/example.tsxExpected Behavior
Freeform combobox should have a callback that is equivalent to native change event that fires on focus lose or on Enter key.
It is not so straightforward to achieve this from user override.
Logs
No response
Requested priority
High
Reason for piority
I encountered this when using v9 Combobox to create TimePicker compat. It is achievable via recomposing (therefore not blocking piority). However I wonder if v9 Combobox intentionally omit this. If not it would be better to fix it on combobox, and if so what's the reason.
Products/sites affected
No response
Are you willing to submit a PR to fix?
no
Validations