Documentation

@kanunilabs/pivotgrid-enterprise


@kanunilabs/pivotgrid-enterprise / pruned

Function: pruned()

pruned(group): FilterGroup | undefined

The tree with empty groups dropped, or undefined if nothing is left.

A group the user added and never filled contributes nothing to the result but changes what layout.prefilter looks like — and an empty AND group inside an OR is worse than noise: depending on the evaluator it can match everything or nothing. Dropping them keeps the saved layout equal to what the dialog showed.

Parameters

group

FilterGroup

Returns

FilterGroup | undefined