deselect filtered rows;

This commit is contained in:
Johann Hoffmann
2026-05-06 17:18:35 +02:00
parent a5d343268f
commit 05e9d948ea
2 changed files with 29 additions and 5 deletions
@@ -64,6 +64,7 @@ export const AbgabetoolAssistenz = {
filteredcountFlat: 0,
selectedcountFlat: 0,
filteredRows: null,
filteredRowsFlat: null,
studiensemesterOptions: null,
allSem: null,
curSem: null,
@@ -308,8 +309,20 @@ export const AbgabetoolAssistenz = {
{
event: 'dataFiltered',
handler: (filters, rows) => {
this.filteredRows = rows
this.filteredcount = rows.length
this.filteredRows = rows;
this.filteredcount = rows.length;
if (!this.selectedData.length) return;
const visibleData = new Set(rows.map(r => r.getData()));
const filteredOut = this.selectedData.filter(sd => !visibleData.has(sd));
if (!filteredOut.length) return;
const filteredOutSet = new Set(filteredOut);
this.$refs.abgabeTable.tabulator.getSelectedRows()
.filter(r => filteredOutSet.has(r.getData()))
.forEach(r => r.deselect());
}
}
],
@@ -495,8 +508,20 @@ export const AbgabetoolAssistenz = {
{
event: 'dataFiltered',
handler: (filters, rows) => {
this.filteredRowsFlat = rows
this.filteredcountFlat = rows.length
this.filteredRowsFlat = rows;
this.filteredcountFlat = rows.length;
if (!this.selectedDataFlat.length) return;
const visibleData = new Set(rows.map(r => r.getData()));
const filteredOut = this.selectedDataFlat.filter(sd => !visibleData.has(sd));
if (!filteredOut.length) return;
const filteredOutSet = new Set(filteredOut);
this.$refs.abgabeTableFlat.tabulator.getSelectedRows()
.filter(r => filteredOutSet.has(r.getData()))
.forEach(r => r.deselect());
}
}
]
-1
View File
@@ -13,7 +13,6 @@ export async function splitMailsHelper(mails, event, subject, body, alertPluginR
{
await alertPluginRef.alertWarning(phrasenPluginRef.t('ui', 'bodyZuLang'));
encodedBody = null;
bodylength = 0;
overhead = subjectlength;
}