-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(FR-460): handle undefined value as controlled value in BAIPropertyFilter #2999
refactor(FR-460): handle undefined value as controlled value in BAIPropertyFilter #2999
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has required the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
---|---|---|---|
🔴 | Statements | 4.9% (-0% 🔻) |
398/8119 |
🔴 | Branches | 4.24% | 239/5636 |
🔴 | Functions | 2.95% (-0% 🔻) |
78/2644 |
🔴 | Lines | 4.82% (-0% 🔻) |
383/7942 |
Show files with reduced coverage 🔻
St.❔ |
File | Statements | Branches | Functions | Lines |
---|---|---|---|---|---|
🔴 | ... / BAIPropertyFilter.tsx |
10.26% (-0.85% 🔻) |
0% | 3.45% (-0.4% 🔻) |
11.27% (-0.67% 🔻) |
Test suite run success
124 tests passing in 14 suites.
Report generated by 🧪jest coverage report action from 5c179f8
e8aa9e4
to
eb05507
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Merge activity
|
…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
eb05507
to
5c179f8
Compare
Resolves #3095 (FR-460)
Why refactoring?
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.Changes
Replaces
useDynamicList
withuseControllableValue
in the BAIPropertyFilter component to improve filter state management. This change: