diff --git a/src/Explorer/Controls/Accordion/AccordionComponent.tsx b/src/Explorer/Controls/Accordion/AccordionComponent.tsx index 90685b6ba..06563c4a3 100644 --- a/src/Explorer/Controls/Accordion/AccordionComponent.tsx +++ b/src/Explorer/Controls/Accordion/AccordionComponent.tsx @@ -3,11 +3,10 @@ */ import * as React from "react"; -import * as Constants from "../../../Common/Constants"; import AnimateHeight from "react-animate-height"; - import TriangleDownIcon from "../../../../images/Triangle-down.svg"; import TriangleRightIcon from "../../../../images/Triangle-right.svg"; +import * as Constants from "../../../Common/Constants"; export interface AccordionComponentProps {} @@ -27,12 +26,12 @@ export interface AccordionItemComponentProps { } interface AccordionItemComponentState { - isExpanded: boolean; + isExpanded?: boolean; } export class AccordionItemComponent extends React.Component { private static readonly durationMS = 500; - private isExpanded: boolean; + private isExpanded?: boolean; constructor(props: AccordionItemComponentProps) { super(props); @@ -79,7 +78,7 @@ export class AccordionItemComponent extends React.Component): void => { + private onHeaderClick = (_event: React.MouseEvent): void => { this.setState({ isExpanded: !this.state.isExpanded }); }; diff --git a/src/Explorer/Notebook/SchemaAnalyzer/SchemaAnalyzerHeader.tsx b/src/Explorer/Notebook/SchemaAnalyzer/SchemaAnalyzerHeader.tsx index 2c91fdcaa..73f5a317e 100644 --- a/src/Explorer/Notebook/SchemaAnalyzer/SchemaAnalyzerHeader.tsx +++ b/src/Explorer/Notebook/SchemaAnalyzer/SchemaAnalyzerHeader.tsx @@ -13,7 +13,7 @@ import * as React from "react"; type SchemaAnalyzerHeaderProps = { isKernelIdle: boolean; isKernelBusy: boolean; - onSampleSizeUpdated: (sampleSize: string) => void; + onSampleSizeUpdated: (sampleSize?: string) => void; onAnalyzeButtonClick: (filter: string, sampleSize: string) => void; }; @@ -30,15 +30,15 @@ export const SchemaAnalyzerHeader = ({ onSampleSizeUpdated, onAnalyzeButtonClick, }: SchemaAnalyzerHeaderProps): JSX.Element => { - const [filter, setFilter] = React.useState(DefaultFilter); - const [sampleSize, setSampleSize] = React.useState(DefaultSampleSize); + const [filter, setFilter] = React.useState(DefaultFilter); + const [sampleSize, setSampleSize] = React.useState(DefaultSampleSize); return ( setFilter(newValue)} + onChange={(_event, newValue?: string) => setFilter(newValue)} label="Filter" placeholder={FilterPlaceholder} disabled={!isKernelIdle} @@ -47,7 +47,7 @@ export const SchemaAnalyzerHeader = ({ { + onChange={(_event, newValue?: string) => { const num = Number(newValue); if (!newValue || (num >= MinSampleSize && num <= MaxSampleSize)) { setSampleSize(newValue); diff --git a/tsconfig.strict.json b/tsconfig.strict.json index 3cd73bf9f..a032541fa 100644 --- a/tsconfig.strict.json +++ b/tsconfig.strict.json @@ -8,6 +8,7 @@ "noUnusedParameters": true }, "files": [ + "./src/Explorer/Controls/Accordion/AccordionComponent.tsx", "./src/AuthType.ts", "./src/Bindings/ReactBindingHandler.ts", "./src/Common/ArrayHashMap.ts", @@ -138,4 +139,4 @@ "src/Terminal/**/*", "src/Utils/arm/**/*" ] -} +} \ No newline at end of file