react-pivottable icon indicating copy to clipboard operation
react-pivottable copied to clipboard

rfc: improve valueFilter API

Open cdaringe opened this issue 4 years ago • 0 comments

problem

i cannot set a predefined, fixed valueFilter onto my table.

i have an unknown dataset with many possible values landing in my table as columns. i do have a well known values that I wan't to exclusively show.

for instance, consider a dataset of fruits: [apple, orange, banana, ...]. additional unknown fruits, like papaya and strawberry, get added over time. now consider that i want to build a declarative, pre-canned table view that shows only oranges.

currently, i cannot do:

valueFilter: {
  fruit: {
    banana: true // or false
  } 
}

because all keys eventually get loaded into react-pivottables internal state.

discussion

can we support a valueFilter to support a declarative, props-driven filter that addresses the above problem?

cdaringe avatar Mar 13 '20 00:03 cdaringe