Not able to disable filter for one column.
Hello !
I'm trying to disable the filter by adding the property "filterable:false" on one specific column , but i'm afraid that this is not working and the filter is shown anyway for that column. Here is my setup for the specific column:
const columns = [
{
header: '',
accessor:'contract_id',
filterable:false,
render: ({value}) => (<button className="btn " onClick={(e) => this.ShowContract(e, value)}>Ver</button>)
}
Any ideas why it is not working? Do i'm settting in the incorrect way or the option for disable filters is not working?
Thanks!
disableFilters: truenot working in v7.7
@hrithiknaha you have to add an accessor property
columns = [{ accessor: 'actions', Header: 'Actions', width: 250, disableSortBy: true, disableFilters: true, },..] disableFilters: true is not working for React Table 7.7.0 disableSortBy: true is working as expected.
On v8:
const columns = [
{
header: 'E-mail',
accessorKey: 'email',
enableColumnFilter: false,
}
]
In the columns object, include the disableGlobalFilter property with a boolean value like...
{ Header: "First Name", accessor: "first_name", disableGlobalFilter: true, // disable global filter for this specific column }My react-table version is 7.7.0
See the section Column Options at the link below
https://react-table.tanstack.com/docs/api/useGlobalFilter#table-options
disableGlobalFilter: true works for me.
