Unverified Commit c084412e authored by BaiJiangJie's avatar BaiJiangJie Committed by GitHub

[Update] 解决Vault翻页再次选择资产时不能设置到select框的问题:select.style === single 时 (#3579)

* [Update] 解决Vault翻页再次选择资产时不能设置到select框的问题:select.style === single 时

* [Update] 优化1
parent ad81d6c2
...@@ -713,9 +713,15 @@ jumpserver.initServerSideDataTable = function (options) { ...@@ -713,9 +713,15 @@ jumpserver.initServerSideDataTable = function (options) {
var rows = table.rows(indexes).data(); var rows = table.rows(indexes).data();
$.each(rows, function (id, row) { $.each(rows, function (id, row) {
if (row.id && $.inArray(row.id, table.selected) === -1) { if (row.id && $.inArray(row.id, table.selected) === -1) {
if (select.style === 'multi'){
table.selected.push(row.id); table.selected.push(row.id);
table.selected_rows.push(row); table.selected_rows.push(row);
} }
else{
table.selected = [row.id];
table.selected_rows = [row];
}
}
}) })
} }
}).on('deselect', function (e, dt, type, indexes) { }).on('deselect', function (e, dt, type, indexes) {
......
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