Commit 8067767a by zhaochengxiang

模型列表已选条数

parent 720554b7
......@@ -227,7 +227,17 @@ const ModelTable = (props) => {
}, [view, keyword]);
const summarySelectedCount = useMemo(() => {
const newSelectedRowKeys = Array.from(new Set([...selectedRowKeys, ...expandedSelectedRowKeys]));
let newSelectedRowKeys = Array.from(new Set([...selectedRowKeys, ...expandedSelectedRowKeys]));
const ids = [];
(data||[]).forEach(item => {
ids.push(item.id);
if (item.alreadyCheckedOut) {
ids.push(item.checkedOutId);
}
})
newSelectedRowKeys = (newSelectedRowKeys||[]).filter(key => ids.indexOf(key) !== -1);
return (newSelectedRowKeys||[]).length;
}, [selectedRowKeys, expandedSelectedRowKeys, data])
......
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