Set column action on condition
I have a table of products. Now if the product is of type 'bundled product' I want to bind an action that when clicked on the product name (the
But if the product is not of type 'bundled' then you shouldn't be able to click the product name since there are no bundled products to display in the modal. So the action should not be attached in that case.
I've tried
Is it even possible to have the action conditionally set? How would I do that?
Thanks for any help and pointers.
TextColumn) a modal opens displaying the contents of the product bundle. But if the product is not of type 'bundled' then you shouldn't be able to click the product name since there are no bundled products to display in the modal. So the action should not be attached in that case.
I've tried
visible, hidden() on the action but they don't seem to work. Not when using a closure and not when passing in a hardcoded true of false value. The product name is always clickable and the action is executed. Is it even possible to have the action conditionally set? How would I do that?
Thanks for any help and pointers.