fix(tablev2): replace JSON.stringify with per-column String() matching in globalFilter#1077
Merged
bert-e merged 1 commit intodevelopment/1.0from Apr 20, 2026
Merged
Conversation
…g in stringifyFilter Part of the implementation plan from scality/agent-task#102.
Contributor
Author
|
/approve |
Contributor
Hello eve-scality,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Contributor
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
Peer approvals must include at least 1 approval from the following list: The following options are set: approve |
hervedombya
approved these changes
Apr 20, 2026
Contributor
|
I have successfully merged the changeset of this pull request
Please check the status of the associated issue RING-53752. Goodbye eve-scality. The following options are set: approve |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes false-positive matches in the TableV2 global filter caused by
JSON.stringify(row.values)serializing the entire row object — including JSON structural characters ({,}), column ID keys (e.g.firstName), and full ISO-8601 date strings with milliseconds — as searchable text.The fix replaces
JSON.stringify(row.values)instringifyFilterwith a per-column iteration overcolumnIds, callingString(row.values[columnId])on each cell value and checking if any includes the search term (case-insensitive). This ensures only rendered column values are matched.Changes
stringifyFilterto use per-columnString()matching — replacedJSON.stringify(row.values)withcolumnIds.some()loop usingString(row.values[columnId])Test Results
All 7 tests pass:
it should display all the datait should sort by defaultSortingKeyit should filterGloballyit should not produce false positive when searching for JSON brace characterit should not produce false positive when searching for a column key nameit should not produce false positive when searching for ISO date millisecond componentit should still match rows when search term appears in a column valueRisks & Notes
The
columnIdsparameter passed by react-table v7'suseGlobalFilterincludes all columns wheredisableGlobalFilter !== true. This means columns explicitly excluded from global filtering will no longer be searchable — which is the correct behavior, unlike the previousJSON.stringifyapproach that searched everything indiscriminately.References