Skip to content

toggle button disable based on state #205

Answered by micahjones13
rbureau85 asked this question in Q&A
Discussion options

You must be logged in to vote

Hey there,

If you use undefined rather than false when setting disabled state, that should fix the problem. Here's a code sandbox example https://codesandbox.io/s/peaceful-cartwright-jzzod
Because Stencil's react output target handles the boolean prop bindings like non-react components, it ends up reading disabled='false' rather than just omitting disabled altogether in the dom. We have a fix implemented already and it'll be released in the next version.
Thanks for bringing this up!

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@rbureau85
Comment options

Answer selected by rbureau85
Comment options

You must be logged in to vote
1 reply
@rbureau85
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
bug Something isn't working as expected or is broken.
3 participants