Skip to content

Commit 86351b8

Browse files
committed
fix: properties collapsing
1 parent 88bd480 commit 86351b8

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/Schema.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,12 @@ export const SchemaView: FunctionComponent<ISchemaView> = props => {
4949
setExpandedRows({ ...expandedRows, [rowKey]: expandRow });
5050
}, []);
5151

52-
const toggleShowExtra = useCallback<MouseEventHandler<HTMLElement>>(() => {
53-
setShowExtra(!showExtra);
54-
}, []);
52+
const toggleShowExtra = useCallback<MouseEventHandler<HTMLElement>>(
53+
() => {
54+
setShowExtra(!showExtra);
55+
},
56+
[showExtra]
57+
);
5558

5659
let actualSchema: ISchema =
5760
!dereferencedSchema || isEmpty(dereferencedSchema)

0 commit comments

Comments
 (0)