Vanessa 2025-09-02 18:36:38 +08:00
parent 8d2e3bfd20
commit 7b2e48d54e

View file

@ -219,6 +219,17 @@ export const setFilter = async (options: {
});
return;
}
if (colData.rollup.calc?.operator && colData.rollup.calc.operator !== "Range") {
if (["Count all", "Count empty", "Count not empty", "Count values", "Count unique values", "Percent empty",
"Percent not empty", "Percent unique values", "Percent checked", "Percent unchecked", "Sum", "Average", "Median",
"Min", "Max"].includes(colData.rollup.calc.operator)) {
filterValue.type = "number";
} else if (["Checked", "Unchecked"].includes(colData.rollup.calc.operator)) {
filterValue.type = "checkbox";
} else if (["Earliest", "Latest"].includes(colData.rollup.calc.operator)) {
filterValue.type = "date";
}
} else {
let targetAVId = "";
fields.find((column) => {
if (column.id === colData.rollup.relationKeyID) {
@ -246,6 +257,8 @@ export const setFilter = async (options: {
return true;
}
});
}
options.data.view.filters.find(item => {
if (item.column === colData.id && item.value.type === "rollup") {
if (!item.value.rollup || !item.value.rollup.contents || item.value.rollup.contents.length === 0) {