From b757303c241196647f4713e8d4b16e2d4b404c92 Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Thu, 6 Jan 2022 11:44:05 +0100 Subject: [PATCH] small changes to js file --- apps/remix-ide/src/app/components/vertical-icons.js | 1 + .../src/lib/remix-ui-vertical-icons-panel.tsx | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/remix-ide/src/app/components/vertical-icons.js b/apps/remix-ide/src/app/components/vertical-icons.js index cd86b1d796..86cedb0014 100644 --- a/apps/remix-ide/src/app/components/vertical-icons.js +++ b/apps/remix-ide/src/app/components/vertical-icons.js @@ -60,6 +60,7 @@ export class VerticalIcons extends Plugin { unlinkContent (profile) { this.targetProfileForRemoval = profile this.removeIcon(profile) + this.renderComponent() } listenOnStatus (profile) { diff --git a/libs/remix-ui/vertical-icons-panel/src/lib/remix-ui-vertical-icons-panel.tsx b/libs/remix-ui/vertical-icons-panel/src/lib/remix-ui-vertical-icons-panel.tsx index 17e2ea7614..0436175a8e 100644 --- a/libs/remix-ui/vertical-icons-panel/src/lib/remix-ui-vertical-icons-panel.tsx +++ b/libs/remix-ui/vertical-icons-panel/src/lib/remix-ui-vertical-icons-panel.tsx @@ -19,8 +19,6 @@ export interface RemixUiVerticalIconsPanelProps { verticalIconsPlugin: VerticalIcons } -let scrollHeight: any - const initialState = { scrollHeight: 0, clientHeight: 0, @@ -52,6 +50,12 @@ export function RemixUiVerticalIconsPanel ({ } }) + useEffect(() => { + addEventListener('pluginDisabled', (evt: any) => { + console.log('plugin disabled and it should have a payload ', { evt }) + }) + }, [Object.keys(verticalIconsPlugin.targetProfileForChange).length]) + function onThemeChanged (themeType: any) { const invert = themeType === 'dark' ? 1 : 0 // @ts-ignore