From b12bccdc3fe56e2b3673904e39890675f36edfdd Mon Sep 17 00:00:00 2001 From: Patrick Gillespie Date: Sat, 11 Jul 2020 16:54:51 -0400 Subject: [PATCH] prettify --- src/components/TableFilterList.js | 12 ++++++++++-- test/MUIDataTableFilterList.test.js | 9 +++++++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/components/TableFilterList.js b/src/components/TableFilterList.js index 453599173..f3b78f408 100644 --- a/src/components/TableFilterList.js +++ b/src/components/TableFilterList.js @@ -52,12 +52,20 @@ const TableFilterList = ({ } else { type = columnNames[index].filterType; } - + return ( removeFilter(index, item[customFilterItemIndex] || [], columnNames[index].name, type, customFilterListUpdate[index])} + onDelete={() => + removeFilter( + index, + item[customFilterItemIndex] || [], + columnNames[index].name, + type, + customFilterListUpdate[index], + ) + } className={classes.chip} itemKey={customFilterItemIndex} index={index} diff --git a/test/MUIDataTableFilterList.test.js b/test/MUIDataTableFilterList.test.js index 1457e0705..b9a65024d 100644 --- a/test/MUIDataTableFilterList.test.js +++ b/test/MUIDataTableFilterList.test.js @@ -160,7 +160,12 @@ describe('', function() { const renderCall = spy(); const updateCall = spy(); const columnsWithCustomFilterListOptions = [ - { name: 'name', label: 'Name', display: true, sort: true, filter: true, + { + name: 'name', + label: 'Name', + display: true, + sort: true, + filter: true, // buildColumns in MUIDataTables spreads options over the column object, so no need to nest this within options filterType: 'custom', customFilterListOptions: { @@ -194,7 +199,7 @@ describe('', function() { name: column.name, filterType: column.filterType || options.filterType, })); - + const wrapper = mount(