From 5a6dc0e89f9681360a4802d585eb0e23f48bb1f9 Mon Sep 17 00:00:00 2001 From: lucataglia Date: Sat, 20 May 2023 23:12:02 +0200 Subject: [PATCH] fix handle of the default value --- packages/react-json-tree/src/expandableButtons.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 (