-
Hi everyone, I'm using react-table v6 and the My problem: I want to enable a delete button when > 0 rows are selected. I can't figure out how to do this properly.
I feed this into the button's How can the parent component know when the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Actually, I realised you can return something in the custom filter methods of each column but since that gets called quite often, it doesn't seem like a great solution. In any event, I decided on a different idea, which I think is probably better from a usability standpoint: disable the filters when any checkboxes are selected. This prevents the problem entirely. If anybody else has the same problem and comes across this thread, maybe consider my solution. It saves a lot of headache for programming and avoids confusion for the user. Only problem is you need to implement custom filters, which can be disabled, since setting |
Beta Was this translation helpful? Give feedback.
Actually, I realised you can return something in the custom filter methods of each column but since that gets called quite often, it doesn't seem like a great solution.
In any event, I decided on a different idea, which I think is probably better from a usability standpoint: disable the filters when any checkboxes are selected. This prevents the problem entirely. If anybody else has the same problem and comes across this thread, maybe consider my solution. It saves a lot of headache for programming and avoids confusion for the user.
Only problem is you need to implement custom filters, which can be disabled, since setting
filterable
tofalse
resets and hides all filters, which is probably…