diff --git a/src/App.js b/src/App.js index 6b07abb..362eca2 100644 --- a/src/App.js +++ b/src/App.js @@ -100,7 +100,7 @@ function App() { {/* */} {/* */} {/* */} - {/* */} + {/* */} {/*
diff --git a/src/components/ReactTable4/GlobalFilter.js b/src/components/ReactTable4/GlobalFilter.js index 1ebf2fc..5932ea8 100644 --- a/src/components/ReactTable4/GlobalFilter.js +++ b/src/components/ReactTable4/GlobalFilter.js @@ -55,3 +55,49 @@ export const GlobalFilter = ({ filter, setFilter }) => { style={{ backgroundColor: "#F9FBFF", borderColor: "#B5D6FF" }} /> */ } + +// ? اگر میخواستم کاری کنم که وقتی رویه سرچ باکس میزدم ایکن ضربدر هاید میشد و ایکن کنسل میومد باید از این کد استفاده میکردم + +// import React, { useState } from "react"; +// import { useAsyncDebounce } from "react-table"; + +// import search from "./search-normal.svg"; +// import cancleIcon from "./zarbedar-icon.svg"; + +// export const GlobalFilter = ({ filter, setFilter }) => { +// const [activeSearchBox, setActiveSearchBox] = useState(false); + +// const [value, setValue] = useState(filter); + +// const onChange = useAsyncDebounce((value) => { +// setFilter(value || undefined); +// }, 400); + +// return ( +//
+// {activeSearchBox === true ? ( +// +// ) : ( +// +// )} +// setFilter(e.target.value)} +// onFocus={() => setActiveSearchBox(true)} +// onBlur={() => setActiveSearchBox(false)} +// type="text" +// 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" }} +// /> +// {console.log(activeSearchBox)}{" "} +//
+// ); +// };