From 7c2d31913bbd9d30156ede24800f921d6b85ff98 Mon Sep 17 00:00:00 2001 From: Marco Schumacher Date: Fri, 23 Dec 2022 11:13:30 +0100 Subject: [PATCH] feat: classNames for popover and its backdrop --- src/components/filterControl.tsx | 14 +++++++++++++- src/theme/defaultTheme/popover.tsx | 12 +++++++++++- src/types.ts | 5 +++++ 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/src/components/filterControl.tsx b/src/components/filterControl.tsx index d7578e1..ad36285 100644 --- a/src/components/filterControl.tsx +++ b/src/components/filterControl.tsx @@ -23,6 +23,10 @@ export function FilterControl(): JSX.Element | null { const filterValue = state.filterValues.get(columnId); return filter !== undefined && filterValue !== undefined && filter.isActive(filterValue); }); + const filterClassNames = table.useState((state) => { + const filter = state.filters.get(columnId); + return filter?.classNames; + }); const filter = table.useState((state) => state.activeColumns.find((column) => column.id === columnId)?.filter); function reset() { @@ -77,7 +81,15 @@ export function FilterControl(): JSX.Element | null { e.stopPropagation(); }} > -