-
-
Notifications
You must be signed in to change notification settings - Fork 268
Expose aggregator outlet to allow rendering additional content in aggregatorCell #116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -25,7 +25,8 @@ | |||
"test:jest": "jest", | |||
"test": "npm run test:eslint && npm run test:prettier && npm run test:jest", | |||
"clean": "rm -rf __tests__ PivotTable.js* PivotTableUI.js* PlotlyRenderers.js* TableRenderers.js* Utilities.js* pivottable.css", | |||
"doPublish": "npm run clean && cp src/pivottable.css . && babel src --out-dir=. --source-maps --presets=env,react --plugins babel-plugin-add-module-exports && npm publish", | |||
"build": "npm run clean && cp src/pivottable.css . && babel src --out-dir=. --source-maps --presets=env,react --plugins babel-plugin-add-module-exports", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I split out the build from the doPublish
so I could include my local branch of react-pivottable
in another app to prototype the new feature.
Seems reasonable to me! I don't have time just now to test and release but I will do so within a couple of days. Please ping me again if I don't get to it? |
For sure, thanks! |
Hey @nicolaskruchten pinging you on this :) |
Sorry for the delay... this is now out in v0.11.0. If you want to keep working on this, maybe I can add you as a contributor and let you do releases? |
Thank you very much for this and apologies for the long delay in responding. Thanks for the contributor offer as well, but I need to pass for now. |
This PR introduces an additional key on aggregators,
outlet
, a function which, if present, gets called once byPivotTableUI
to render additional aggregator-specific content just below the built-in aggregator selector (in the area outlined in red here):Some use cases for providing this escape hatch include:
When the outlet function is called, it will be passed the
PivotTableUI
'sprops.data
, in case the called aggregator wants to make use of that data.Here's a kind of silly example of a custom aggregator using this new function:
Resolves #117