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

Feature: Group by Dynamic Selector Function #849

Merged
merged 10 commits into from
Feb 14, 2024

Conversation

dwcullop
Copy link
Member

@dwcullop dwcullop commented Feb 11, 2024

Description

Addresses #848 by providing new overloads for the Group operator that allow the user to supply a IObservable<Func<TObject, TKey, TGroupKey>> so that the function that is used to obtain the GroupKey can change dynamically. When a new value is supplied, a new GroupKey will be obtained for each item, and if the GroupKey has changed, the item will be moved to the new Group.

Also allows for an optional IObservable<Unit> parameter that will force the current GroupKey selector to be re-applied to all the items.

Issues

This operator also suffers from #851. I will submit another PR that fixes both operators at the same time.

@dwcullop dwcullop self-assigned this Feb 11, 2024
@dwcullop dwcullop marked this pull request as draft February 11, 2024 00:26
@dwcullop dwcullop linked an issue Feb 11, 2024 that may be closed by this pull request
@dwcullop dwcullop marked this pull request as ready for review February 12, 2024 19:26
@dwcullop dwcullop enabled auto-merge (squash) February 12, 2024 19:35
@dwcullop dwcullop merged commit 9b09d9c into reactivemarbles:main Feb 14, 2024
1 check passed
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Group Operator with a Dynamic Grouping Key Selector
2 participants