From 39cfe05b1c924039a74b2ce648ccfe7e4344deb0 Mon Sep 17 00:00:00 2001 From: gitstart Date: Wed, 26 Apr 2023 06:49:44 +0000 Subject: [PATCH] fix: addon panel not updating after disabling an addon Co-authored-by: BikashSah999 <51731962+BikashSah999@users.noreply.github.com> Co-authored-by: phunguyenmurcul <51897872+phunguyenmurcul@users.noreply.github.com> --- code/ui/components/src/tabs/tabs.hooks.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/ui/components/src/tabs/tabs.hooks.tsx b/code/ui/components/src/tabs/tabs.hooks.tsx index 1b6cfafef206..41df6e93f44f 100644 --- a/code/ui/components/src/tabs/tabs.hooks.tsx +++ b/code/ui/components/src/tabs/tabs.hooks.tsx @@ -145,7 +145,8 @@ export function useList(list: ChildrenList) { const crossBorder = x + widthSum + tabWidth > rightBorder; - if (!crossBorder) { + // `!tabButton` happens when new tab has just been added + if (!crossBorder || !tabButton) { newVisibleList.push(item); }