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
unique aggregation return [SetIterator] instead of array #2173
Comments
This is strange that it works with importing directly, but not as a string option |
@tannerlinsley I did a little digging on this today. The build process for react-table is converting to
The rescripts builder (used by the examples), does not make that conversion (which is why importing the function directly in the example App.js works, but importing it from the react-table bundle does not). There is probably a way to configure rollup and/or babel not to make that conversion, but I'm not sure how. An alternative is just to use the slightly older fashioned syntax (which the rollup build process does not convert):
If you're happy with that approach I'll try and submit a PR tomorrow. |
That would be great :) |
Update syntax in return line of unique aggregation function Use Array.from() instead of the spread operator [...] Motivation: prevent polyfilling to [].concat() to enable reference by string in column definitions closes TanStack#2173
Update syntax in return line of unique aggregation function Use Array.from() instead of the spread operator [...] Motivation: prevent polyfilling to [].concat() to enable reference by string in column definitions closes TanStack#2173
Update syntax in return line of unique aggregation function Use Array.from() instead of the spread operator [...] Motivation: prevent polyfilling to [].concat() to enable reference by string in column definitions closes #2173 Co-authored-by: Thomas Marr <thomas.marr@arup.com>
🎉 This issue has been resolved in version 7.2.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Describe the bug (required)
Seems like the following
unique
premade aggregation not working well:https://github.com/tannerlinsley/react-table/blob/master/src/aggregations.js#L70-L72
I have the following column:
when I check the log it prints [SetIterator] instead of the unique values as an array.
if I am doing the following it works as expected:
https://codesandbox.io/s/laughing-pond-ieulg?file=/src/App.js
The text was updated successfully, but these errors were encountered: