Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion types/tabulator-tables/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3174,7 +3174,7 @@ declare class Tabulator {
getFilters: (includeHeaderFilters?: boolean) => Filter[];

/** You can programmatically set the header filter value of a column by calling the setHeaderFilterValue function, This function takes any of the standard column component look up options as its first parameter, with the value for the header filter as the second option. */
setHeaderFilterValue: (column: ColumnLookup, value: string) => void;
setHeaderFilterValue: (column: ColumnLookup, value: string | string[]) => void;

/** You can programmatically set the focus on a header filter element by calling the setHeaderFilterFocus function, This function takes any of the standard column component look up options as its first parameter. */
setHeaderFilterFocus: (column: ColumnLookup) => void;
Expand Down
12 changes: 12 additions & 0 deletions types/tabulator-tables/tabulator-tables-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -899,10 +899,22 @@ table = new Tabulator("#example-table", {
return value >= params.legalAge;
},
accessorHtmlOutputParams: { legalAge: 18 },
headerFilter: "input",
},
{
title: "Name2",
field: "name2",
headerFilter: "list",
headerFilterParams: {
multiselect: true,
values: ["value1", "value2", "value3"],
},
},
],
});
const filterVal = table.getHeaderFilterValue("name");
table.setHeaderFilterValue("name", "value");
table.setHeaderFilterValue("name2", ["value1", "value3"]);
table.recalc();
const columns = table.getColumns(true);
columns.forEach(col => col.getDefinition());
Expand Down