File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import { Omit } from '@stoplight/types';
55import { Component } from 'react' ;
66import { ErrorMessage } from './common/ErrorMessage' ;
77import { MutedText } from './common/MutedText' ;
8- import { ISchemaView , SchemaView } from './Schema ' ;
8+ import { ISchemaView , SchemaView } from './SchemaView ' ;
99import { ThemeZone } from './theme' ;
1010import { isSchemaViewerEmpty } from './util/isSchemaViewerEmpty' ;
1111
Original file line number Diff line number Diff line change @@ -45,9 +45,12 @@ export const SchemaView: FunctionComponent<ISchemaView> = props => {
4545 const [ showExtra , setShowExtra ] = useState < boolean > ( false ) ;
4646 const [ expandedRows , setExpandedRows ] = useState < Dictionary < boolean > > ( { all : expanded } ) ;
4747
48- const toggleExpandRow = useCallback < ( rowKey : string , expanded : boolean ) => void > ( ( rowKey , expandRow ) => {
49- setExpandedRows ( { ...expandedRows , [ rowKey ] : expandRow } ) ;
50- } , [ ] ) ;
48+ const toggleExpandRow = useCallback < ( rowKey : string , expanded : boolean ) => void > (
49+ ( rowKey , expandRow ) => {
50+ setExpandedRows ( { ...expandedRows , [ rowKey ] : expandRow } ) ;
51+ } ,
52+ [ expandedRows ]
53+ ) ;
5154
5255 const toggleShowExtra = useCallback < MouseEventHandler < HTMLElement > > (
5356 ( ) => {
You can’t perform that action at this time.
0 commit comments