diff --git a/packages/react-json-tree/src/expandableButtons.tsx b/packages/react-json-tree/src/expandableButtons.tsx index 5c56a12b..cbf909bc 100644 --- a/packages/react-json-tree/src/expandableButtons.tsx +++ b/packages/react-json-tree/src/expandableButtons.tsx @@ -77,7 +77,7 @@ function ExpandButton({ if ( shouldExpandNode === 'collapse' || - (isDefault && expandableDefaultValue === 'collapse') + (isDefault && expandableDefaultValue === 'expand') ) { return (
@@ -105,7 +105,7 @@ function CollapseButton({ if ( shouldExpandNode === 'expand' || - (isDefault && expandableDefaultValue === 'expand') + (isDefault && expandableDefaultValue === 'collapse') ) { return (