Currently clicking the clearButton just sets the selectedOptions to an empty array but does not fire the onChange event. Our understanding is, that clearing the selectedOptions property and therefore also setting the value of the component to undefined is a change of the state of the component. Forms need to be informed of this change to properly handle the state of the form (isDirty flags, etc.). This is usually done by firing the "onChange" event.
Have you discussed this feature with our team
No response
Additional context
In our current project we use react-hook-form together with FluentUI react-components. Clearing comboboxes or dropdowns is not recognized as change of the components because the onChange event is nor fired. Therefore, the forms state isDirty and dirtyFields are not set. Unfortunately also no other event is fired so we are not able to mitigate this missing behaviour.
Validations
[X] Check that there isn't already an issue that requests the same feature to avoid creating a duplicate.
Library
React Components / v9 (@fluentui/react-components)
Describe the feature that you would like added
Currently clicking the clearButton just sets the selectedOptions to an empty array but does not fire the onChange event. Our understanding is, that clearing the selectedOptions property and therefore also setting the value of the component to undefined is a change of the state of the component. Forms need to be informed of this change to properly handle the state of the form (isDirty flags, etc.). This is usually done by firing the "onChange" event.
Have you discussed this feature with our team
No response
Additional context
In our current project we use react-hook-form together with FluentUI react-components. Clearing comboboxes or dropdowns is not recognized as change of the components because the onChange event is nor fired. Therefore, the forms state isDirty and dirtyFields are not set. Unfortunately also no other event is fired so we are not able to mitigate this missing behaviour.
Validations
Priority
High