Skip to content

Commit

Permalink
submit form with enter.
Browse files Browse the repository at this point in the history
  • Loading branch information
Meriem-BenIsmail committed Dec 9, 2024
1 parent 5736739 commit 26dad41
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/base/src/panelview/formbuilder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,15 @@ export class ObjectPropertiesForm extends React.Component<IProps, IStates> {
className="jpcad-property-panel"
data-path={this.props.filePath ?? ''}
>
<div className="jpcad-property-outer jp-scrollbar-tiny">
<div
className="jpcad-property-outer jp-scrollbar-tiny"
onKeyUp={(e: React.KeyboardEvent) => {
if (e.key === 'Enter') {
e.preventDefault();
submitRef.current?.click();
}
}}
>
<WrappedFormComponent
schema={schema}
uiSchema={this.generateUiSchema(this.props.schema)}
Expand Down

0 comments on commit 26dad41

Please sign in to comment.