您将如何在ES6中执行以下操作:
$("#gridid").jqGrid("filterToolbar", {
beforeSearch: function () {
var postData = $(this).jqGrid("getGridParam", "postData");
if (postData.hasOwnProperty("idmycolumn")) {
postData.idmysearch = postData.idmycolumn;
delete postData.idmycolumn;
}
}
});
试过这个:
getInitialState: function() {
return {
elements: this.buildElements(0, 20),
isInfiniteLoading: false
}
},
这只是给出:"未捕获的ReferenceError:元素未定义"
答案 0 :(得分:1)
constructor(props) {
super(props);
this.state = { isInfiniteLoading: false , elements: this.buildElements(0, 20)};
}