Hello,
actually, page reload is a too bulky solution for this task.
Webix data components replace client-side ids for the newly added items with the server-side ones as normally the server generates unique ids. DataProcessor listens to this id change and replaces the old id with new one from the response:
//response
{ "id":"123145644453", "status":"success", "newid":"8" }
If you want to work with the newly added item immediately, you need to catch the moment when id has already been changed, e.g. on DataProcessor onAfterAdd
event:
save: {
//DataProcessor configuration
url:url,
on:{
onAfterInsert:function(state, id, data){ webix.message(state.newid); }
}
}
http://webix.com/snippet/04d8fd4d
If you want to visualize id change, use updateFromResponse
property, which will repaint the row: http://webix.com/snippet/b5689497
Btw, in case of user editing, the problem should not occur as users need some time to edit the item after it has been added. Try editing the newly added item with the dedicated editor: http://webix.com/snippet/61869a35