diff --git a/packages/react-json-tree/src/expandableButtons.tsx b/packages/react-json-tree/src/expandableButtons.tsx index a4e4818d..ed9f9856 100644 --- a/packages/react-json-tree/src/expandableButtons.tsx +++ b/packages/react-json-tree/src/expandableButtons.tsx @@ -5,7 +5,6 @@ import { Expandable } from '.'; interface Props { expandable?: Expandable; - expandableDefaultValue?: 'expand' | 'collapse'; shouldExpandNode?: 'expand' | 'collapse' | 'default'; setShouldExpandNode: any; } @@ -31,7 +30,6 @@ interface DefaultButtonProps { function ExpandableButtons({ expandable, - expandableDefaultValue, setShouldExpandNode, shouldExpandNode }: Props){ @@ -39,13 +37,15 @@ function ExpandableButtons({ return <>> } + const expandableDefaultValue = expandable?.defaultValue || 'expand' + return (