From 26dad41a915d96210846203f8978eda82b51b292 Mon Sep 17 00:00:00 2001 From: Meriem-BenIsmail Date: Fri, 6 Dec 2024 16:47:22 +0100 Subject: [PATCH] submit form with enter. --- packages/base/src/panelview/formbuilder.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/base/src/panelview/formbuilder.tsx b/packages/base/src/panelview/formbuilder.tsx index 69532a37..b732cd93 100644 --- a/packages/base/src/panelview/formbuilder.tsx +++ b/packages/base/src/panelview/formbuilder.tsx @@ -152,7 +152,15 @@ export class ObjectPropertiesForm extends React.Component { className="jpcad-property-panel" data-path={this.props.filePath ?? ''} > -
+
{ + if (e.key === 'Enter') { + e.preventDefault(); + submitRef.current?.click(); + } + }} + >