Unplanned
Last Updated: 02 Jul 2021 09:31 by ADMIN
Mrugendra
Created on: 02 Jul 2021 05:37
Type: Feature Request
0
Form Component: Get changed values only

Hi,

 

The Kendo React Form Handle Submit event provides complete data over all fields, even the unchanged ones. While this is good for traditional submits, we are building upon a REST service that has HTTP patch support,  wherein we intend to submit only those fields (properties) that have changed. 

While a deep compare with initialValues and handleSubmit data property is possible, we were wondering if the Kendo Form component itself has some property Or method that allows us to get the changed values only.  This will save us the deep compare efforts, time and issues, especially with forms that have hundreds of fields.   

If Kendo library has some deep compare method available, please do include that as well.

Kindly advise.

 

 

3 comments
ADMIN
Stefan
Posted on: 02 Jul 2021 09:31

Hello, Mrugendra,

I transferred it to an official public feature request.

We will monitor the interest and plan it accordingly.

As compare library, we can only share resources, but we prefer not to recommend one, as we are not using any internally:

https://dmitripavlutin.com/how-to-compare-objects-in-javascript/

https://stackoverflow.com/questions/1068834/object-comparison-in-javascript

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.

Mrugendra
Posted on: 02 Jul 2021 07:58

Hello,

 

Thank you for reply. Please go ahead and convert this to a feature request.

 

We are scouting for a stable deep compare library to use between initial values and the modified values, any suggestions? We looked at things like these: https://www.npmjs.com/package/deep-diff

 

Thanks again for the quick reply.

 

 

ADMIN
Stefan
Posted on: 02 Jul 2021 07:34

Hello, Mrugendra,

Currently, we only have this information for the entire Form (modified, touched, visited) and per Field:

https://www.telerik.com/kendo-react-ui/components/form/api/FormRenderProps/

https://www.telerik.com/kendo-react-ui/components/form/api/FieldRenderProps/

If you wish I can suggest logging a feature request for a method that will return the Form values with the information on which Fields are modified, touched, or visited:

https://feedback.telerik.com/kendo-react-ui

I can also directly convert this ticket to a request if you prefer it that way.

Regards,
Stefan
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.