Users describe the rows they want, and the plugin sets the table's column filters. Filtering runs in the browser, on the rows your table holds.
Tickets that were escalated, or reopened at least twice
filter Escalated is truefilter or Reopened is at least 2Show all unsolved tickets
filter Status is not Solvedfilter Status is not ClosedEscalated tickets from customers on the Enterprise plan
filter Escalated is truefilter Plan is Enterpriseconst features = tableFeatures({ columnFilteringFeature, filteredRowModel: createFilteredRowModel(),}); const table = useTable({ features, columns, data, defaultColumn: assistantColumn, // filterFn: assistantFilter on every column});columnFilteringFeature and filteredRowModel registered in tableFeatures.assistantFilter as each column's filterFn. assistantColumn sets it; if no column has it, the plugin warns once in the browser console.manualFiltering on the table.The quickstart has the whole table.
| Column type | Operators |
|---|---|
string | contains, doesNotContain, equals, doesNotEqual, startsWith, endsWith, isEmpty, isNotEmpty, isAnyOf |
number | =, !=, >, >=, <, <=, isEmpty, isNotEmpty, isAnyOf |
date, dateTime | is, not, after, onOrAfter, before, onOrBefore, isEmpty, isNotEmpty |
boolean | is |
singleSelect | is, not, isAnyOf |
equals and isAnyOf also ignore accents.date column compares calendar days in the user's time zone; is and not on a dateTime compare to the minute.singleSelect answer names the option's label; the plugin stores its value.An answer replaces the table's column filters, including any the user set by hand, and clears a global filter such as a search box. The filters an answer set go with the next question, so a follow-up narrows them. Filters your own code set in another format are not described to Gridsay, and assistantFilter keeps every row for them.
With manualFiltering: true, the plugin tells Gridsay filtering is switched off, and a question that needs a filter is declined. The plugin's filter is a browser function; your server would not know how to run it. Sorting and grouping on your server still work: see Server-side data.
enableColumnFilter: false or its own filterFn.Each is declined: ask resolves false, the table stays as it was, and error.message is the assistant's sentence. If an answer would still filter a table that has filtering switched off, Gridsay declines it with "Filtering is switched off for this table." A declined question is charged. See Refusals and errors.