From bb1b1d6c6adb8ddc9c056b90ec8a09d196e064d1 Mon Sep 17 00:00:00 2001 From: Keith Daulton Date: Thu, 15 Dec 2022 10:40:42 -0500 Subject: [PATCH] Updates local branch filter in the graph --- src/webviews/apps/plus/graph/GraphWrapper.tsx | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/webviews/apps/plus/graph/GraphWrapper.tsx b/src/webviews/apps/plus/graph/GraphWrapper.tsx index e1d0b99..2e1a37b 100644 --- a/src/webviews/apps/plus/graph/GraphWrapper.tsx +++ b/src/webviews/apps/plus/graph/GraphWrapper.tsx @@ -505,10 +505,16 @@ export function GraphWrapper({ } }; + // This can only be applied to one radio button for now due to a bug in the component: https://github.com/microsoft/fast/issues/6381 const handleLocalBranchFiltering = (e: Event | FormEvent) => { const $el = e.target as HTMLInputElement; + const value = $el.value; const isChecked = $el.checked; - onIncludeOnlyRef?.(!isChecked); + const wantsAllBranches = value === 'branch-all' && isChecked; + if (isAllBranches === wantsAllBranches) { + return; + } + onIncludeOnlyRef?.(wantsAllBranches); }; const handleMissingAvatars = (emails: GraphAvatars) => { @@ -853,20 +859,18 @@ export function GraphWrapper({ Filter options - + Show All Local Branches - + Show Current Branch Only