function update_grouplist_items(){
//console.log("calling1");
window.setTimeout(function(){
$$("cfg").reconstruct()
}, 3000);
}
$.ajax({
type: "POST",
xhrFields:{
withCredentials: true
},
beforeSend: function(request){
request.setRequestHeader("Content-type", 'application/json');
},
cache: false,
url:savedataUrl,
data : JSON.stringify(data, null, '\t'),
processData: false,
success: update_grouplist_items,
});
我正在尝试在成功时重新加载“cfg”组件(列表)。当我保持调试器控制台打开时,我看到它被刷新(添加了新项目)。但是当控制台关闭时,我看到组件正在刷新,但没有项目添加到列表中。 (基本上我会看到组件闪烁)。我使用 Internet Explorer 作为浏览器。任何帮助将不胜感激。
最佳答案
所有数据组件都提供clearAll和解析API,因此要以最有效的方式重新加载组列表,您需要使用类似next的东西
list.clearAll();
list.parse(new_data);
它只会重新绘制数据并最大限度地减少闪烁。
https://docs.webix.com/api__link__ui.proto_clearall.html https://docs.webix.com/api__link__ui.proto_parse.html
关于javascript - Webix 组件未刷新,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46282084/