Hello Paul,
Thank you for contacting us.
Query 1: “When I click on the "3" the DropDownList maps the value to the correct text of the selected item. After changing or just saving it, the correct text is shown in the InPlaceEditor. I was expecting it to also map it correctly on intial rendering.”
Yes. This is the behavior of our In-place Editor component. By default, your saved value is shown on In-place Editor component. The selected
text is stored in In-place Editor component and corresponding mapped
value is stored on in-place editor’s
value property. If you wish to show the corresponding
value in the In-place Editor component after saved the changes, you can change the value property using
actionSuccess event. Please find the below code.
[app.component.html]
<ejs-inplaceeditor (actionSuccess)="actionSuccess($event)"></ejs-inplaceeditor> |
[app.component.ts]
@ViewChild('dropDown1') editObj: InPlaceEditorComponent;
public actionSuccess(e: ActionEventArgs ): void {
(<any>e).value = (<any>this.editObj).value;
} |
Query 2: “I added another InPlaceEditor which maps to an extended version of the regular class (added usrType: UserType) just to see if this works - which does except then the value when going into edit mode is empty.”
Yes. This is the behavior of our In-place Editor component. By default, the dropdown field value is mapped into In-place Editor component’s default value. If you have mapped the In-place Editor default value as DropDownList field text, the In-place editor shows the empty edit option. Because, corresponding dropdown field value is needed to map on In-place Editor default value.
Query 3: “I'm using NGRX and would like to use an effect to update the entity on the server and get back a success/error notification and also show a spinner indicating the value is being updated. I saw on the demo that this happens when using the UrlAdaptor but I don't think I can intercept the request and kind of route it through NGRX.”
You can get the action success or failure notification status using
actionSuccess or
actionFailure event. By default, spinner indication shows when update the value into the database.
Please let us know if you need any further assistance on this.
Regards,
Prince