Files
wekan/models/lib/tableViewFilter.js
T
Lauri Ojansivu bdec1744f4 Apply board filters in Table view
Build the Table card query from the active board Filter and an immutable board and archive scope, while retaining the view-specific text search.

Thanks to rmb82 and xet7 !

Fixes #6629,
2026-08-25 01:14:39 +03:00

12 lines
437 B
JavaScript

'use strict';
// Pure selector builder for the per-board Table view. The active Filter owns a
// top-level $or, so always combine it with the board boundary through $and.
function tableViewCardsSelector(boardId, filterSelector) {
const base = { boardId, archived: false };
if (!filterSelector || Object.keys(filterSelector).length === 0) return base;
return { $and: [filterSelector, base] };
}
export { tableViewCardsSelector };