Table button column - Control component

As seen in the image, for some reason a column of type Button cannot have an on click event handler that controls a component. Am I missing something or is this a case for a feature request? Seems odd that the Table buttons are completely different from normal Button components.

My use case is to change the view key of a container that the Table is in. Basically a frozen column to click "into" a row.


Yeah, I ran into similar issues when I tried the same thing. What you need to do is to create a JS Query and run your logic to control the component there. Virtually everything in a component can be controlled (including showing a view from a tabbed container).

const view = emailTableContainer.currentViewIndex
emailTableContainer.setCurrentViewIndex(view === 0 ? 1: 0)

@Ron_West neat solution. Thanks!

1 Like