jsgrid returns 更新后空行

jsgrid returns blank line after update

在 jsgrid 中通过 ajax 进行更新后,行 returns 空白

controller: {
    loadData: function(filter) {
        var data = $.Deferred();
        $.ajax({
            type: "GET",
            contentType: "application/json; charset=utf-8",
            url: "/app/Play/",
            dataType: "json"
        }).done(function(response) {
            data.resolve(response);
        });
        return data.promise();
    },
    updateItem: function(item) {
        return $.ajax({
            type: "POST",
            url: "/app/Play/change.php",
            data: item,
        });
    },
}

在 url 更新的 return 中:/app/Play/change.php

我return正常更新记录数据json,和初始json一样,在load

中使用

已解决:

controller: {
    loadData: function(filter) {
        var data = $.Deferred();
        $.ajax({
            type: "GET",
            contentType: "application/json; charset=utf-8",
            url: "/app/Jogos/app/",
            data: filter, // <--Insert line, this is a problem
            dataType: "json"
        }).done(function(response) {
            data.resolve(response);
        });
        return data.promise();
    },
    updateItem: function(item) {
        return $.ajax({
            type: "POST",
            url: "/app/Jogos/app/change.php",
            data: item
        });
    },
},