From f82d40e122ae271424c45f5e080e9bc5aa6567a8 Mon Sep 17 00:00:00 2001 From: Stephan Lee Date: Wed, 3 Nov 2021 16:56:56 -0700 Subject: [PATCH 1/2] timeseries: fix button toggle state issue 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. --- .../main_view/main_view_component.ng.html | 32 ++++++++++++------- .../views/main_view/main_view_component.scss | 19 ++++++++--- 2 files changed, 35 insertions(+), 16 deletions(-) diff --git a/tensorboard/webapp/metrics/views/main_view/main_view_component.ng.html b/tensorboard/webapp/metrics/views/main_view/main_view_component.ng.html index 21ea4784495..a74c3d105ce 100644 --- a/tensorboard/webapp/metrics/views/main_view/main_view_component.ng.html +++ b/tensorboard/webapp/metrics/views/main_view/main_view_component.ng.html @@ -17,30 +17,38 @@
- All - - +