What happened to the tooltip for Filters in event handlers for controlling table? I think I've familiarised myself with the syntax of it but still good to have that tool tip there.
What I'm struggling though is probably the operators and accepted values for each. I've been scurrying over your docs and can't seem to find your filter operators table. I used to find it in this link. By struggling, I mean there's a few trial&error happening before I can move on from that particular task. Can we have that filter operators table back?
Thanks for surfacing this, I've brought both the tooltip and docs issue up with the team. Is there a particular way you're trying to use filters at the moment that I might be able to help with?
Hi @Kabirdas, thanks for replying. Not really at the moment, I was able to figure it out but that took me some time to figure out. This is for ease of life in working with filters.
The prior doc which has since been unlinked had a bit more information that we can bring back, but I'll post here for now:
table.setFilters(filters: FilterObject[], filterStackType?: 'and' | 'or' )
Set one or more filters with an array of filter objects.
setFilters([{ columnName: "name", filterValue: "max", operator: "contains" }])
Supported operators
"contains"
"doesNotContain"
"isEmpty"
"isNotEmpty"
"equals"
"doesNotEqual"
"greaterThan"
"lessThan"
"greaterThanOrEqual"
"lessThanOrEqual"
"before"
"after"
Passing in an empty array will reset the filters on the table:
setFilters([])
When passing multiple filters, you should set the filterStackType. FilterStackType must be either "and" or "or" (defaults to "and" if no value set):
setFilters([{ columnName: "name", filterValue: "max", operator: "contains" }, { columnName: "name", filterValue: "john", operator: "contains" }], "or")
Please, let me know if there's anything else I can provide, thanks!
Hey folks! Our filter operators have been added to the Build tables guide! Check this out to see detailed documentation on the methods and operator options available with the filterStack object: Display and edit data with the Table component | Retool Docs
Note - this is relevant to the new Table component released a few months ago. Thanks for your patience as we got these added to the docs