diff --git a/types/tabulator-tables/index.d.ts b/types/tabulator-tables/index.d.ts index 408e262a23c681..fd71ead6cc580c 100755 --- a/types/tabulator-tables/index.d.ts +++ b/types/tabulator-tables/index.d.ts @@ -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; diff --git a/types/tabulator-tables/tabulator-tables-tests.ts b/types/tabulator-tables/tabulator-tables-tests.ts index 7cca3fd8d3e44f..6398f4eaee7874 100644 --- a/types/tabulator-tables/tabulator-tables-tests.ts +++ b/types/tabulator-tables/tabulator-tables-tests.ts @@ -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());