edit filter function added#113
Conversation
|
@dakshshahani Saving an edited filter appends it to the end and can change mixed AND/OR logic. Is it possible to make it so that editing a filter edits it in place (track the edited filter ID/index)? Otherwise LGTM 👍 |
Adds handleFilterUpdate that replaces a filter selection in-place by ID using the existing .map(). Exposes it as onFilterUpdate in QueryContextType and the provider value object.
|
@geoff-jiang ^^ please check how copilot changed CI, changes admin's CI pipeline |
|
Track the edited filter's ID and update it in place; previously editing removed the original then appended a new one at the end with a fresh UUID. Updated add/update/remove query using ID (may be complex to maintain later lol) |
|
Visit the preview URL for this PR (updated for commit dc2e35c): https://dev-nwplus-admin--pr113-28998989634-tjq5qlot.web.app (expires Sun, 19 Jul 2026 06:39:27 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: c290bf9e2fac0401389f751f415cce4267517b51 |
geoff-jiang
left a comment
There was a problem hiding this comment.
LGTM 👍 i think the CI failed earlier due to server errors, not anything on our side, but this fix is also fine.
Reason
Users cannot edit their filters while querying on admin.
Explanation
Allowing users to edit their filters applied to the search on the query tab.
Function updates newFilter states with filter being edited. Function also removed filter being updated.