Datatable not load data after save

Hi,

I have a simple crud, open a page, this page have a datatable where show records and button “add new” in toolbar over datatable, when click “add new” button appear form in a popup for new registry, name, surname, etc, and button to save form values, then, user fill data and press save button, data is saved in database from buton save of form with this code. (this work fine).

 view: "button", value: "save", width: 190, click: function () {

 var formdata = this.getParentView().getParentView().getValues();
                                    
var data =  {
             name: formdata.txtName,       
               email: formdata.txtEmail,
               surname: formdata.txtSurname,
              username: formdata.txtUserName
   }
  webix.ajax()
           .headers({ 'Content-type': 'application/json' })
               .post("/user/add", data, {
                                            error: function (text, data, XmlHttpRequest) {

                                                webix.alert("Error", "alert-warning");
                                            },
                                            success: (text, data, XmlHttpRequest) => {
                                                var res = JSON.parse(text);
                                                if (res.error === 200) {

                                                    loadData();
                                                    this.getTopParentView().hide();
                                                   
                                                }
                                                if (res.error === 409) {
                                                    webix.alert("already exist", "alert-warning", function () { $$("txtUserName").focus(); });
                                                    
                                                } 
                                                if (res.error === 500)
                                                    webix.alert("error",alert-warning");

                                               

                                            }
                                        });
}

The code above work fine, when succes i call loadData() function, this function is called too from ready() of the page, for show records when load first time.
but after save data and try reload datatable , not show new record,

this is function loadData

import { JetView, plugins } from "webix-jet";

function loadData() {

    var data = webix.ajax("/user/getusers");
    $$(usersIDS.idTable).clearAll();
    $$(usersIDS.idTable).parse(data);
}

export default class UsersView extends JetView {
[....]

Is it a delay problem? please, how to solve, i try load with sync() but same problem.

Any help would be appreciated.

Thanks in advance!!

perhaps you have some cache problems
try to use unique query instead

function loadData() {

    webix.ajax("/user/getusers?v="+webix.uid()).then(function(result){
        $$(usersIDS.idTable).clearAll();
        $$(usersIDS.idTable).parse(result.json());
    });
}