Edit template with nested object

Hello,

I am not able edit a nested object field on the grid with the editTemplate option. Is there a way we can achieve this?

Example: https://codesandbox.io/s/brave-bhabha-ub40ft?file=/src/App.js

Thanks.


3 Replies 1 reply marked as answer

PS Pavithra Subramaniyam Syncfusion Team August 23, 2022 02:16 PM UTC

Hi Dan,


Thanks for contacting Syncfusion support.


By default, We have mapped the complex field editor component with the id in which the “.” is replaced with three underscores “___”. So, we suggest setting the “id” and “name” attributes for the edit template as “firstname___sub” instead of “firstname.sub” to overcome the reported issue.


<input

      type="text"

      name="firstname___sub"

      id="firstname___sub"

      defaultValue={props.firstname.sub}

    />

 


Sample: https://codesandbox.io/s/eloquent-stallman-3td41s


Please get back to us if you need further assistance on this.


Regards,

Pavithra S


Marked as answer

JO Joey August 24, 2022 05:31 AM UTC

Where is this documented at?



PS Pavithra Subramaniyam Syncfusion Team August 25, 2022 02:15 PM UTC

Hi Dan,


Currently, we don’t have documentation for this scenario. However, we have created a documentation task for “Edit Template for Complex columns” and it will be included in our online guide in the future.


Regards,

Pavithra S


Loader.
Up arrow icon