From 7dd8bd567f5069de8218e6be9cddf537c8e74d4e Mon Sep 17 00:00:00 2001 From: Sunil Kumar Yadav <79906609+sunilyadav840@users.noreply.github.com> Date: Thu, 15 Jul 2021 08:12:46 +0530 Subject: [PATCH] fixed typescript strict useSidePanel.ts PanelContainerComponent.tsx etc (#802) * fixed typescript strict useSidePanel.ts PanelContainerComponent.tsx SchemaAnalyzerSplashScreen.tsx files * update snapshot --- src/Explorer/Panes/PanelContainerComponent.tsx | 8 ++++---- tsconfig.strict.json | 5 ++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/Explorer/Panes/PanelContainerComponent.tsx b/src/Explorer/Panes/PanelContainerComponent.tsx index f489f7114..e60f07230 100644 --- a/src/Explorer/Panes/PanelContainerComponent.tsx +++ b/src/Explorer/Panes/PanelContainerComponent.tsx @@ -4,8 +4,8 @@ import { useNotificationConsole } from "../../hooks/useNotificationConsole"; import { useSidePanel } from "../../hooks/useSidePanel"; export interface PanelContainerProps { - headerText: string; - panelContent: JSX.Element; + headerText?: string; + panelContent?: JSX.Element; isConsoleExpanded: boolean; isOpen: boolean; panelWidth?: string; @@ -66,8 +66,8 @@ export class PanelContainerComponent extends React.Component): void => { - if ((ev.target as HTMLElement).id === "notificationConsoleHeader") { + private onDissmiss = (ev?: KeyboardEvent | React.SyntheticEvent): void => { + if (ev && (ev.target as HTMLElement).id === "notificationConsoleHeader") { ev.preventDefault(); } else { useSidePanel.getState().closeSidePanel(); diff --git a/tsconfig.strict.json b/tsconfig.strict.json index 07976aaa1..4b569ef59 100644 --- a/tsconfig.strict.json +++ b/tsconfig.strict.json @@ -8,6 +8,9 @@ "noUnusedParameters": true }, "files": [ + "./src/Explorer/Notebook/SchemaAnalyzer/SchemaAnalyzerSplashScreen.tsx", + "./src/Explorer/Panes/PanelContainerComponent.tsx", + "./src/hooks/useSidePanel.ts", "./src/AuthType.ts", "./src/Bindings/ReactBindingHandler.ts", "./src/Common/ArrayHashMap.ts", @@ -152,4 +155,4 @@ "src/Terminal/**/*", "src/Utils/arm/**/*" ] -} +} \ No newline at end of file