Kendo React Form Within Kendo React Dialog

1 Answer 80 Views
Dialog Form
n/a
Top achievements
Rank 1
n/a asked on 03 Feb 2022, 09:38 PM

HI,

I have a Dialog with some Kendo controls - something like the attached screenshot.

const onSave = () => {

...

}

 

{props.visible && (<Dialog title={"Split Audience"} height={{dialogHeight}} width={800} closeIcon={false}>
<Form onSubmit={onSave} render={formRenderProps => <FormElement>

...

<Field name={"SS_"+index} maxLength={55} component={SegmentNameInput} defaultValue={segmentName+'_'+suffixValues[index]}
validator={segmentNameValidator}/>

...

</FormElement>

}/>

    <DialogActionsBar layout={"end"}>
        <button
className="k-button k-button-md k-rounded-md k-button-solid k-button-solid-primary dialog-save" type="submit">
Save
</button>
</DialogActionsBar>

The issue is that the onSave submit handler never gets invoked.  I was wondering if it is because the <Form..> is within the dialog?

 

Any help would be appreciated.

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 04 Feb 2022, 07:10 AM

Hello,

Thank you for the details.

That can occur if the submit button is outside of the FormElement component. That is the element where we render the native HTML form element. If the button is outside of it the submit event will not be fired. That is the reason why our demo with Form in a Dialog does not use the DialogActionsButtons component:

https://www.telerik.com/kendo-react-ui/components/grid/editing/editing-external-form/

Regards,
Stefan
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Dialog Form
Asked by
n/a
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or