Accessing button config from outside of initial config
Accessing button config from outside of initial config

How do I access a button's config from outside of the initial button initialization? Following from one of the examples on the site I've added a 'state' attribute to my button definition, so that in the action I can toggle the state (ie changing the size of the table) and change the text of the button accordingly. (Show More / Show Less)
I now need to do the same from outside the action and whilst I can change the text easily enough I can't see how I access the config to allow me to set that 'state' attribute so it works correctly when I do click on the button..