const AllCountryTable = () = {
inputRef = useRef(null)
indiaTable = useReactTable()
americaTable = useReactTable()
const handleSubmit = () => {
FILTER_VALUE = inputRef.current.value
indiaTable.getColumn("personName").setFilterValue(FILTER_VALUE)
americaTable.getColumn("personName").setFilterValue(FILTER_VALUE)
// MORE table comes more lines to add
}
return(
<div>
<div>Filter by person name</div>
<input type="text" ref={inputRef} > </input>
<button onClick={} >Filter</button>
// code to display the tables
// more table comes more view code needs to add
{...}
</div>
)
}
const AllCountryTable = () = {
inputRef = useRef(null)
indiaTable = useReactTable()
americaTable = useReactTable()
const handleSubmit = () => {
FILTER_VALUE = inputRef.current.value
indiaTable.getColumn("personName").setFilterValue(FILTER_VALUE)
americaTable.getColumn("personName").setFilterValue(FILTER_VALUE)
// MORE table comes more lines to add
}
return(
<div>
<div>Filter by person name</div>
<input type="text" ref={inputRef} > </input>
<button onClick={} >Filter</button>
// code to display the tables
// more table comes more view code needs to add
{...}
</div>
)
}