Skip to content

Commit aae6ce2

Browse files
committed
feat: pass manual filter props into chip bar component
Signed-off-by: Mike Murray <[email protected]>
1 parent 9c75959 commit aae6ce2

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

package/src/components/DataTable/DataTable.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ const DataTable = React.forwardRef(function DataTable(props, ref) {
103103
shouldShowAdditionalFilters,
104104
onRowClick,
105105
onRemoveFilter,
106+
onRemoveManualFilter,
106107
isLoading,
107108

108109
// Props from the useTable hook
@@ -120,7 +121,7 @@ const DataTable = React.forwardRef(function DataTable(props, ref) {
120121
previousPage,
121122
debounceSetGlobalFilter,
122123
setPageSize,
123-
state: { pageIndex, pageSize, filters }
124+
state: { pageIndex, pageSize, filters, manualFilters }
124125
} = props;
125126
const classes = useStyles();
126127
const theme = useTheme();
@@ -336,8 +337,10 @@ const DataTable = React.forwardRef(function DataTable(props, ref) {
336337
<DataTableFilterChipBar
337338
columns={flatColumns}
338339
filters={filters}
340+
manualFilters={manualFilters}
339341
labels={labels}
340342
onRemove={onRemoveFilter}
343+
onRemoveManualFilter={onRemoveManualFilter}
341344
/>
342345
<div className={classes.tableWrapper}>
343346
<Table ref={ref} {...getTableProps()}>
@@ -619,6 +622,10 @@ DataTable.propTypes = {
619622
* Event triggered when a filter is removed with the `(key, multiSelectValueIfAvailable) => {}` signature.
620623
*/
621624
onRemoveFilter: PropTypes.func,
625+
/**
626+
* Event triggered when a manual filter is removed with the `(key) => {}` signature.
627+
*/
628+
onRemoveManualFilter: PropTypes.func,
622629
/**
623630
* Event triggered when a row is clicked
624631
*/

0 commit comments

Comments
 (0)