delete multiple items

This isn't working just yet, still needs some work
This commit is contained in:
Chris Cochrun 2023-03-03 11:30:42 -06:00
parent 6799c7c820
commit 63c1dfdb5a

View file

@ -357,9 +357,14 @@ ColumnLayout {
Kirigami.Action { Kirigami.Action {
text: "delete" text: "delete"
onTriggered: { onTriggered: {
let selection = selectionModel.selectedIndexes; var selection = [];
for (let i = 0; i < selection.length; i++) { var length = selectionModel.selectedIndexes.length;
for (let i = 0; i < length; i++) {
selection.push(selectionModel.selectedIndexes[i]);
console.log(selection[i].row); console.log(selection[i].row);
/* root.deleteItemFunction(selection[i].row); */
}
for (let i = 0; i < length; i++) {
root.deleteItemFunction(selection[i].row); root.deleteItemFunction(selection[i].row);
} }
} }