Hi,
I have a feature request - add ability to hide a column filter in addition to just disabling it.
According to this documentation, disabling a column filter is supported, but in my case, I want to go an extra step to hide a column filter, because in my project, I have a column called "Actions", and there are some action buttons, like showing details, etc, in the cells of that column. Even if I can disable the filtering for that column, it would be really nice that I can just hide it, rather than showing a disabled filter. Visually, hiding the disabled filter in my case will be much better. So, if possible, an extra prop in FilteringState.ColumnExtension interface, like filteringVisible: boolean;, would be nice.
devextreme-reactive: 1.1.1
react: 16.2.0
browser: Chrome/Edge
material-ui: yes
Hi,
Thank you for sharing your idea! Currently, you can implement the described functionality by using a custom template for a filter cell.
const Cell = (props) => {
if (props.column.name === 'name') {
return <TableFilterRow.Cell {...props}>
</TableFilterRow.Cell>
}
return (<TableFilterRow.Cell {...props} />);
};
<Grid>
<TableFilterRow cellComponent={Cell} />
</Grid>
This demo shows it in action.
Moreover, I'd point one more solution. It's based on using the DataTypeProvider plugin. It can be more convenient in your case. Please refer to this sample to see how this approach works.
@SergeyAlexeev Thanks a lot for your decent solutions! Solved my problem!
This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests.
Most helpful comment
Hi,
Thank you for sharing your idea! Currently, you can implement the described functionality by using a custom template for a filter cell.
This demo shows it in action.
Moreover, I'd point one more solution. It's based on using the DataTypeProvider plugin. It can be more convenient in your case. Please refer to this sample to see how this approach works.