Commit 0bf1717b by RuoYi

修复rememberSelected属性设置为true时保留选中状态

parent 83a96a23
......@@ -98,6 +98,12 @@
if ($.common.isNotEmpty($.table._option.sidePagination) && $.table._option.sidePagination == 'client') {
return res.rows;
} else {
if ($.common.isNotEmpty($.table._option.rememberSelected) && $.table._option.rememberSelected) {
var column = $.common.isEmpty($.table._option.uniqueId) ? $.table._option.columns[1].field : $.table._option.uniqueId;
$.each(res.rows, function(i, row) {
row.state = $.inArray(row[column], selectionIds) !== -1;
})
}
return { rows: res.rows, total: res.total };
}
} else {
......
......@@ -73,6 +73,7 @@
showPageGo: true,
rememberSelected: true,
columns: [{
field: 'state',
checkbox: true
},
{
......
......@@ -81,6 +81,7 @@
showPageGo: true,
rememberSelected: true,
columns: [{
field: 'state',
checkbox: true
},
{
......
......@@ -57,6 +57,7 @@
clickToSelect: true,
rememberSelected: true,
columns: [{
field: 'state',
checkbox: true
},
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment