Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

189
Views
Múltiples botones de envío en el formulario de Kendo

¿Es posible tener múltiples botones de envío, cada uno de ellos llamando a otra función en Kendo?

Por ejemplo tengo un formulario como este:

 <Form onSubmit={handleSubmit} render={(formRenderProps) => ( <FormElement style={{ maxWidth: 650, }} > <fieldset className={"k-form-fieldset"} style={{marginTop:'2vh'}}> <legend className={"k-form-legend"}> Atributes: </legend> <div className="mb-3"> {tempAtr.map((data) => <Field name={data.naziv} component={ data.id === 1 ?Input: data.id === 2 ?Input: data.id === 3 ?DatePicker: data.id === 4 ?Input: data.id === 5 ?Input: data.id === 6 ?DropDownList: data.id === 7 ?DropDownList: data.id === 8 ?MultiSelect: data.id === 9 ?MultiSelect: Input} label={data.name} />)} </div> </fieldset> <div className="k-form-buttons"> <Button type={"submit"} className='appBar-containers' disabled={!formRenderProps.allowSubmit} > Save </Button> <Button type={"submit"} className='appBar-containers' disabled={!formRenderProps.allowSubmit} > Start </Button> </div> </FormElement> )} />

Entonces, cuando hago clic en Guardar, va a SaveFunction, y cuando hago clic en Iniciar, va a StartFunction. Cualquier ayuda será muy apreciada.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Si alguien está buscando una respuesta, lo hice de esta manera. Se agregó una identificación a cada uno de los botones:

 <Button id='SaveButton'>Save</Button> <Button id='StartButton'>Start</Button>

y en la función onSubmit agregó esto:

 const handleSubmit = (dataItem,event) => { if(event.nativeEvent.submitter.id=='StartButton') { startSession(dataItem); } else { saveChanges(dataItem); } };
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!