Expose aggregator outlet to allow rendering additional content in aggregatorCell#116
Merged
Merged
Conversation
nselikoff
commented
Oct 19, 2020
| "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", |
Contributor
Author
There was a problem hiding this comment.
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.
Contributor
|
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? |
Contributor
Author
|
For sure, thanks! |
Contributor
Author
|
Hey @nicolaskruchten pinging you on this :) |
Contributor
|
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? |
Contributor
Author
|
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces an additional key on aggregators,
outlet, a function which, if present, gets called once byPivotTableUIto 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