material-react-table
material-react-table copied to clipboard
GlobalFilter appears twice after I use renderToolbarInternalActions
material-react-table version
2.0.4
react & react-dom versions
18.2.0
Describe the bug and the steps to reproduce it
I have those settings but the globalFilter TextField appears twice instead of one time. I use renderToolbarInternalActions to remove all unnecessary internal actions
const table = useMaterialReactTable({
columns,
data: data?.results ?? [],
enableColumnActions: false,
enableSorting: false,
manualFiltering: true,
onGlobalFilterChange: setGlobalFilter,
onPaginationChange: setPagination,
state: {
isLoading,
globalFilter,
},
initialState: {
density: "compact",
showGlobalFilter: true,
},
renderToolbarInternalActions: ({ table }) => (
<Box display='flex'>
<Tooltip title="Reîmprospătează">
<IconButton
onClick={() => refetch()}
size="small"
>
<RefreshIcon />
</IconButton>
</Tooltip>
<MRT_GlobalFilterTextField table={table} />
</Box>
),
})
Minimal, Reproducible Example - (Optional, but Recommended)
Not yet
Screenshots or Videos (Optional)
Do you intend to try to help solve this bug with your own PR?
No, because I do not know how
Terms
- [X] I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.