From 3505bcc6a8333bad5be21c4d4f3c05c621f9b721 Mon Sep 17 00:00:00 2001 From: mahdi andalib Date: Fri, 18 Feb 2022 17:27:15 +0330 Subject: [PATCH] added and updated --- src/components/ReactTable4/BasicTable.js | 7 ++----- src/components/ReactTable4/ColumnSearch.js | 8 ++++---- src/components/ReactTable4/GlobalFilter.js | 4 ++-- src/components/ReactTable4/SelectColumnFilter.js | 7 ++++--- src/components/ReactTable4/columns.js | 1 - 5 files changed, 12 insertions(+), 15 deletions(-) diff --git a/src/components/ReactTable4/BasicTable.js b/src/components/ReactTable4/BasicTable.js index c08ce5c..be962b7 100644 --- a/src/components/ReactTable4/BasicTable.js +++ b/src/components/ReactTable4/BasicTable.js @@ -187,15 +187,12 @@ const BasicTable = ({ settingsIcon }) => { ))} - {/* filters */} + {/* filter row */} {headerGroups.map((headerGroup) => ( {headerGroup.headers.map((column) => ( - + {column.canFilter ? column.render("Filter") : null} ))} diff --git a/src/components/ReactTable4/ColumnSearch.js b/src/components/ReactTable4/ColumnSearch.js index 2410238..b1de9e9 100644 --- a/src/components/ReactTable4/ColumnSearch.js +++ b/src/components/ReactTable4/ColumnSearch.js @@ -8,26 +8,26 @@ export const ColumnSearch = ({ column }) => { const [activeSearchBox, setActiveSearchBox] = useState(false); return ( -
+
{activeSearchBox && ( setActiveSearchBox(false)} /> )} setFilter(e.target.value)} onFocus={() => setActiveSearchBox(true)} - className={`text-xs text-blue-400 rounded focus:outline-none placeholder-blue-400 border p-1`} + className={`w-9/12 text-xs text-blue-400 rounded focus:outline-none border p-1 focus:border-blue-200 focus:ring focus:ring-blue-200 focus:ring-opacity-20`} style={{ backgroundColor: "#F9FBFF", borderColor: "#B5D6FF" }} />
diff --git a/src/components/ReactTable4/GlobalFilter.js b/src/components/ReactTable4/GlobalFilter.js index 6bfbe90..bfb437b 100644 --- a/src/components/ReactTable4/GlobalFilter.js +++ b/src/components/ReactTable4/GlobalFilter.js @@ -14,7 +14,7 @@ export const GlobalFilter = ({ filter, setFilter }) => { }, 400); return ( -
+
{activeSearchBox && ( { onFocus={() => setActiveSearchBox(true)} // onBlur={() => setActiveSearchBox(false)} type="text" - className={`text-xs text-blue-400 rounded focus:outline-none placeholder-blue-400 border`} + className={`text-xs text-blue-400 rounded focus:outline-none border focus:border-blue-200 focus:ring focus:ring-blue-200 focus:ring-opacity-20`} style={{ backgroundColor: "#F9FBFF", borderColor: "#B5D6FF" }} />
diff --git a/src/components/ReactTable4/SelectColumnFilter.js b/src/components/ReactTable4/SelectColumnFilter.js index 1e1920a..df7d650 100644 --- a/src/components/ReactTable4/SelectColumnFilter.js +++ b/src/components/ReactTable4/SelectColumnFilter.js @@ -13,7 +13,8 @@ export const SelectColumnFilter = ({ return (