You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the BAIPropertyFilter component, when the value is explicitly set to undefined, it should be treated as having no value rather than being in an uncontrolled mode. Currently, this causes issues where the component's internal state does not update when the value is changed via props from the parent, rather than being reset by the user. This issue needs to be addressed to ensure proper state management.
The text was updated successfully, but these errors were encountered:
…opertyFilter (#2999)
Resolves#3095 (FR-460)
## Why refactoring?
In the `BAIPropertyFilter` component, when the `value` is explicitly set to `undefined`, it should be treated as having no value rather than being in an uncontrolled mode. Currently, this causes issues where the component's internal state does not update when the `value` is changed via props from the parent, rather than being reset by the user. This issue needs to be addressed to ensure proper state management.
## Changes
Replaces `useDynamicList` with `useControllableValue` in the BAIPropertyFilter component to improve filter state management. This change:
- Introduces key-based filter tracking for more reliable tag removal
- Simplifies filter value updates through a centralized update function
- Fixes empty string handling in filter parsing
- Removes unnecessary effect hook dependencies
- Streamlines option generation for the AutoComplete component
In the
BAIPropertyFilter
component, when thevalue
is explicitly set toundefined
, it should be treated as having no value rather than being in an uncontrolled mode. Currently, this causes issues where the component's internal state does not update when thevalue
is changed via props from the parent, rather than being reset by the user. This issue needs to be addressed to ensure proper state management.The text was updated successfully, but these errors were encountered: