Skip to content
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

Custom Bucket Rendering #264

Open
ThomasJejkal opened this issue Feb 13, 2024 · 1 comment
Open

Custom Bucket Rendering #264

ThomasJejkal opened this issue Feb 13, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@ThomasJejkal
Copy link

Package version (if known): v2.2.5

Describe the bug

I'm not sure whether it is justified to file a bug in this regard, but there seem to be a mismatch between documentation and code, which might be easy to fix. While evaluating react-searchkit for our purposes, I arrived at the point where I wanted to customize bucket rendering to support enhanced aggregations (namely ISO-date-time ranges). I've checked this documentation page and was a bit disappointed that in the "Usage when overriding" section no implementation for BucketAggregationContainer and MyBucketAggregationValues could be found, not even a very basic one.

So I decided to work with the elasticsearch demo, as it should contain an example for that scenario. Unfortunately, I realized, that the demo uses the properties 'renderValuesContainerElement' and 'renderValueElement' of BucketAggregation instead, which seem to be not available in version 2.2.5 anymore (I found them in version 1.X).

Now I'm wondering if it would be possible, to provide an easy example based on the demo code, which is working with the current version?

Many thanks in advance.

@ThomasJejkal ThomasJejkal added the bug Something isn't working label Feb 13, 2024
@ntarocco
Copy link
Contributor

ntarocco commented May 6, 2024

The BucketAggregationContainer.element takes only one param valuesCmp (see source code here): it is useful when you need to override the default HTML content of the container containing the list of buckets.
Indeed, the documentation should describe an example, we will fix that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants