How to get the feature flags of useReactTable instance in columnDefs? #5435
Unanswered
mikhaelesa
asked this question in
Q&A
Replies: 1 comment
-
set row.getCanMultiSelect = () => {
if (typeof table.options.enableMultiRowSelection === 'function') {
return table.options.enableMultiRowSelection(row)
}
return table.options.enableMultiRowSelection ?? true
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So I have this useReactTable instance with some feature flags set
And this is my columndef
Since I use this column in multiple places, I really want to use the same column def instead of recreating it again. The problem is that some places don't need to have multiple row selection. Since the column def allows this feature by default (See the onChange), it doesn't allow me to do that.
If there's only some way to get the
enableMultiRowSelection
flag through the column def, then I can just do a simple ternary condition based on that.Is there any solution to this? Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions