Skip to content
This repository was archived by the owner on Feb 27, 2026. It is now read-only.
This repository was archived by the owner on Feb 27, 2026. It is now read-only.

Collection hooks property filter doesn't work with complex objects #41

@yug1991

Description

@yug1991

Describe the bug
When I pass an object as value for a table component column, property filter (or free text filter) doesn't work properly. I can write a query like Data = [object Object] to see all rows. The bug is rooted in filterUsingOperator method in collection-hooks/dist/cjs/operations/property-filter.js
return (itemValue + '').toLowerCase().indexOf((tokenValue + '').toLowerCase()) > -1; where {} + '' => '[object Object]'.

Should have used JSON.stringify() instead of string concatenation.

To Reproduce
Create a table with filter, pass { a: 1 } as value for a column. Try search for this row.

Reproduction link
See screenshots below

Expected behavior
Filter should work with non-string objects.

Screenshots


Environment (please complete the following information):
n/a

Additional context
n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions