Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

timeseries: fix button toggle state issue #5398

Merged
merged 2 commits into from
Nov 4, 2021

Conversation

stephanwlee
Copy link
Contributor

Angular material components are not truly "controlled input" that even
if the parent sets checked state to false, if user clicked on the
button from false to true to cause a redux state change that makes
parent put that state, it will have a value checked. This is directly
observable by printing out value of checked vs. value set by parent.

We work around this issue by simply using button that acts like a
checkbox instead of using an Angular material component. Also, styled
carefully to make it look about the same.

Angular material components are not truly "controlled input" that even
if the parent sets `checked` state to false, if user clicked on the
button from false to true to cause a redux state change that makes
parent put that state, it will have a value `checked`. This is directly
observable by printing out value of `checked` vs. value set by parent.

We work around this issue by simply using button that acts like a
checkbox instead of using an Angular material component. Also, styled
carefully to make it look about the same.
@stephanwlee stephanwlee merged commit 4c4df35 into tensorflow:master Nov 4, 2021
@stephanwlee stephanwlee deleted the toggle branch November 4, 2021 20:54
yatbear pushed a commit to yatbear/tensorboard that referenced this pull request Mar 27, 2023
Angular material components are not truly "controlled input" that even
if the parent sets `checked` state to false, if user clicked on the
button from false to true to cause a redux state change that makes
parent put that state, it will have a value `checked`. This is directly
observable by printing out value of `checked` vs. value set by parent.

We work around this issue by simply using button that acts like a
checkbox instead of using an Angular material component. Also, styled
carefully to make it look about the same.
dna2github pushed a commit to dna2fork/tensorboard that referenced this pull request May 1, 2023
Angular material components are not truly "controlled input" that even
if the parent sets `checked` state to false, if user clicked on the
button from false to true to cause a redux state change that makes
parent put that state, it will have a value `checked`. This is directly
observable by printing out value of `checked` vs. value set by parent.

We work around this issue by simply using button that acts like a
checkbox instead of using an Angular material component. Also, styled
carefully to make it look about the same.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants