mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-04 16:04:45 +08:00
Merge pull request #8332 from Dretch/ui-grid-filter-condition
Allow IFilterOptions.condition to be set to a function, as the documentation describes
This commit is contained in:
@@ -41,6 +41,9 @@ columnDef.filter = {
|
||||
selectOptions: [{value: 4, label: 'test'}],
|
||||
disableCancelButton: false
|
||||
};
|
||||
columnDef.filter.condition = (searchTerm: string, cellValue: any, row: uiGrid.IGridRow, column: uiGrid.IGridColumn): boolean => {
|
||||
return true;
|
||||
};
|
||||
columnDef.filterCellFiltered = false;
|
||||
columnDef.filterHeaderTemplate = '<div blah="test"></div>';
|
||||
columnDef.filters = [columnDef.filter];
|
||||
|
||||
Vendored
+1
-1
@@ -3844,7 +3844,7 @@ declare module uiGrid {
|
||||
* or you can supply a custom filter function that gets passed the
|
||||
* following arguments: [searchTerm, cellValue, row, column].
|
||||
*/
|
||||
condition?: number;
|
||||
condition?: number | ((searchTerm: string, cellValue: any, row: IGridRow, column: IGridColumn) => boolean);
|
||||
/**
|
||||
* If set, the filter field will be pre-populated with this value
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user