using InplaceEditor in a Loop have default data which added previously

Hi,

I am using InplaceEditor inside the loop. Once I insert value and add new input. New Input get default value which is added previosuly. take a look to stackblitz example and video I attached. 


https://stackblitz.com/edit/angular-kfriwc?file=app.component.html


let me know the soultion of the problem. 


Regards,

Parth


Attachment: Inplaceeditor_issue_3208edfd.7z

1 Reply

IS Indrajith Srinivasan Syncfusion Team December 14, 2021 01:33 PM UTC

Hi Parth,


Greetings from Syncfusion support,


The reported issue occurs since you are using the same model values for all the In-place editor being rendered. We suggest you to update, the model value separately for each in-place editor in the beginEdit event. Check the below sample for reference.


 

    <ejs-inplaceeditor

    #inplace_editor

    mode="Inline"

    [popupSettings]="settings"

    (beginEdit)="onbegin($event)"

    type="Text"

    ></ejs-inplaceeditor>

 

 

onbegin(args) {

    (document.activeElement as any).ej2_instances[0].model = { placeholder: 'Enter employee name' };

  }

 


Sample: https://stackblitz.com/edit/angular-kfriwc-ufjrcv?file=app.component.ts


Please let us know if the solution helps,


Regards,

Indrajith


Loader.
Up arrow icon