Skip to content

Commit bff7f42

Browse files
authored
Pressing the 'a' key when onCreate is not defined (#87)
1 parent 0a57bce commit bff7f42

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

packages/react-arborist/src/components/default-container.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,7 @@ export function DefaultContainer() {
137137
tree.selectAll();
138138
return;
139139
}
140-
if (e.key === "a" && !e.metaKey) {
141-
if (!tree.props.onCreate) return;
140+
if (e.key === "a" && !e.metaKey && tree.props.onCreate) {
142141
tree.createLeaf();
143142
return;
144143
}

0 commit comments

Comments
 (0)