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

Enhancement - ObservableGroupMap discard undefined/null #270

Open
ProTip opened this issue Jul 29, 2020 · 1 comment
Open

Enhancement - ObservableGroupMap discard undefined/null #270

ProTip opened this issue Jul 29, 2020 · 1 comment

Comments

@ProTip
Copy link

ProTip commented Jul 29, 2020

I have a use case where I'm grouping items that may not have the keys present needed to generate a grouping key. In these cases I would actually prefer to not group them at all(vs dumping them in a catch-all bucket). I could envision other use cases where the the decision to group or not may be useful.

Current behavior appears to actually group every item with an undefined key into the same array? If so I would propose the option to discard items that have an undefined groupBy key.

@NaridaL
Copy link
Collaborator

NaridaL commented Jul 30, 2020

Not grouping items which have an undefined groupBy value is sensible. Unfortunately at this point changing it for everything would be a breaking change. Is the "catch-all" bucket causing a specific problem which would make it worth adding an option?

EDIT: Adding a symbol NOGROUP, which the groupBy function could return, would be a backwards compatible option which wouldn't require an option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants