Binding to a data model & JWT posts

Hi,


I've been trying to get the ejs-inplaceeditor to bind to a value on my datamodel. I've been looking at the examples for data binding, and it seems to concentrate on multi value arrays for drop downs, not for single value entries.

I can get the control to display the value by binding the value property, but the documentation seems to imply it for when there is no value, so that doesn't strike me as correct.

Is there an example that shows an in place editor taking the value from a class e.g. myClassInstance.myProperty and binding to it, then updating said class when a change is performed? So on control initialisation myClass.myProperty contains "1", then a change is made via the in place editor, and the myClass.myProperty is now "2".

I would also like to use the url/post mechanism to update the appropriate object on the backend, but there's no way nice way to attach a JWT token to the call, like using Angular interceptors. Is there a way of achieving this?

Many thanks,
John

5 Replies 1 reply marked as answer

IS Indrajith Srinivasan Syncfusion Team February 10, 2021 12:49 PM UTC

Hi John, 
 
Greetings from Syncfusion support, 
 
We have validated your reported query. You can get the corresponding changed object in the change event of the Inplace-editor, which can be then send to the backend. Check the below shared sample for reference. 
 
 
 
 
Please let us know if the solution helps, 
 
Regards, 
Indrajith 



JM John McLoughlin February 11, 2021 09:45 AM UTC

Hi,

Thanks for the reply, it's not quite what I'm looking for. You are using an array to populate a dropdown list, what I want is to have an object myClass and bind its myProperty property to a text input in place editor.

Sorry I failed to mentioned the text input in place editor before.

Best regards,
John


IS Indrajith Srinivasan Syncfusion Team February 12, 2021 10:41 AM UTC

Hi John, 
 
Good day to you, 
 
We have validated your reported query. We have prepared a sample meeting your requirements, by populating the Inplace-editor object value in change event. Below is the modified sample for reference. 
 
 
Can you please check the above sample, and let us know if it meets your requirements ? 
 
Regards, 
Indrajith 



JM John McLoughlin February 12, 2021 02:52 PM UTC

Hi Indrajith,

Thanks.

OK, so I should be binding to the value property then, great thanks. I'll also try that change event.

Onto the other half of my question, is there a nice way to use an Angular interceptor to attach the JWT token to the call being made by the control to the APi?

Thanks,
John


IS Indrajith Srinivasan Syncfusion Team February 15, 2021 12:07 PM UTC

Hi John, 
 
Welcome, 
 
We have validated the reported query “Is there a nice way to use an Angular interceptor to attach the JWT token to the call being made by the control to the APi”. We suggest you to use the actionBegin event in the control, for sending the JWT token to the API. 
 
 
Please get back to us if you face any difficulties, 
 
Regards, 
Indrajith 


Marked as answer
Loader.
Up arrow icon