IO-979 Delete parts orders.

This commit is contained in:
Patrick Fic
2021-05-03 12:30:23 -07:00
parent fed9d6c1b2
commit e285cfa2b0
7 changed files with 82 additions and 7 deletions

View File

@@ -413,6 +413,18 @@ export function JobLinesComponent({
scroll={{
x: true,
}}
onRow={(record, rowIndex) => {
return {
onDoubleClick: (event) => {
const notMatchingLines = selectedLines.filter(
(i) => i.id !== record.id
);
notMatchingLines.length !== selectedLines.length
? setSelectedLines(notMatchingLines)
: setSelectedLines([...selectedLines, record]);
}, // double click row
};
}}
rowSelection={{
selectedRowKeys: selectedLines.map((item) => item.id),
onSelectAll: (selected, selectedRows, changeRows) => {