Skip to content

Commit 5830035

Browse files
committed
Fix bug when changing type to a collection type
1 parent dee5a79 commit 5830035

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/ValueNodeWrapper.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ export const ValueNodeWrapper: React.FC<ValueNodeProps> = (props) => {
126126
const customNode = customNodeDefinitions.find((customNode) => customNode.name === type)
127127
if (customNode) {
128128
onEdit(customNode.defaultValue, path)
129+
setCurrentlyEditingElement(null)
129130
setDataType(type)
130131
} else {
131132
const newValue = convertValue(
@@ -138,6 +139,7 @@ export const ValueNodeWrapper: React.FC<ValueNodeProps> = (props) => {
138139
)
139140
updateValue(newValue as ValueData)
140141
onEdit(newValue, path)
142+
setCurrentlyEditingElement(null)
141143
setDataType(type)
142144
}
143145
}

0 commit comments

Comments
 (0)