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

Customize filters

Open oScape opened this issue 7 years ago • 4 comments

Hi,

I am implementing your project in my react application but I don't find the way to limit the filters available for my users. For example I don't want them to use Table Heatmap, only Table, and the same for Sum and Sum over Sum. Have you any tips I could use to resolve my problem?

By the way, it's an awesome project, congrats! Regards

oScape avatar Feb 08 '18 10:02 oScape

Glad you like it!

You can pass in whatever you like for the aggregator and renderer menus via the aggregators and renderers props. They take a name as a key and a function as a value. The built-in functions are available via import {aggregators, renderers} from 'react-pivottable/Utilities'; I believe.

nicolaskruchten avatar Feb 08 '18 15:02 nicolaskruchten

Glad you like it!

You can pass in whatever you like for the aggregator and renderer menus via the aggregators and renderers props. They take a name as a key and a function as a value. The built-in functions are available via import {aggregators, renderers} from 'react-pivottable/Utilities'; I believe.

Hi @nicolaskruchten, could you give me an example. I didn't get how I can select just some aggregators instead all default one.

This project is simply perfect. congrats!

jeffersonshibuya avatar Aug 13 '19 21:08 jeffersonshibuya

Hey @nicolaskruchten , I don't think it's possible to pass in custom aggregators -- here is where the renderers can be passed in

sevgibson avatar Feb 23 '20 22:02 sevgibson

It's possible that adding aggregators here in this prop list will all the defaults to be overridden. I may submit a PR if I can get it to work (fairly green for react though).

sevgibson avatar Feb 23 '20 23:02 sevgibson