diff --git a/packages/react-arborist/src/components/default-container.tsx b/packages/react-arborist/src/components/default-container.tsx index d0fd4b2c..112e9b38 100644 --- a/packages/react-arborist/src/components/default-container.tsx +++ b/packages/react-arborist/src/components/default-container.tsx @@ -137,8 +137,7 @@ export function DefaultContainer() { tree.selectAll(); return; } - if (e.key === "a" && !e.metaKey) { - if (!tree.props.onCreate) return; + if (e.key === "a" && !e.metaKey && tree.props.onCreate) { tree.createLeaf(); return; }