@antv/s2
Version:
effective spreadsheet render core lib
21 lines • 775 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getDimsCondition = void 0;
const constant_1 = require("../../common/constant");
function getDimsCondition(parent, force) {
const cond = {};
let p = parent;
while (p && p.field) {
/**
* 当为表格布局时,小计行的内容是“小计”不需要作为筛选条件
* 当为树状布局时,force可以强行指定小计行,即父类目作为筛选条件
*/
if ((!p.isTotalRoot || force) && p.value !== constant_1.EMPTY_FIELD_VALUE) {
cond[p.field] = p.value;
}
p = p.parent;
}
return cond;
}
exports.getDimsCondition = getDimsCondition;
//# sourceMappingURL=get-dims-condition-by-node.js.map