Forum Discussion
MarkRash865
2 months agoCommunity Member
Setting the state of an object to "Disabled" or "Hidden"
Has anyone bumped into an issue of not being able to use JavaScript to change the state of an object to the built-in "Disabled" or "Hidden" state? I'm able to set to "Normal" and any custom states, but for some reason, those two just do not work and pop an error in the console saying these are not valid states. See screenshot for an example:
2 Replies
- CharlotteHaslerCommunity Member
Hey,
I've logged the states to the console and got "_disabled" for the disabled state. Probably because the disabled-state is always like an overlay to the state the object had before.And it works to change the state if you use object.state = "_disabled"
Unfortunately I didn't find a way to do something similar with the hidden state.
- MarkRash865Community Member
That's great! Thanks for sharing this!