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

feat(component-store): added custom equal option in select #3933

Merged
merged 1 commit into from
Jun 21, 2023
Merged

feat(component-store): added custom equal option in select #3933

merged 1 commit into from
Jun 21, 2023

Conversation

rosostolato
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

select uses distinctUntilChanged but there was no way to provide a custom equality fn.

Closes #3931

What is the new behavior?

Added equal option to provide a custom equality function for distinctUntilChanged in select method.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

@netlify
Copy link

netlify bot commented Jun 19, 2023

Deploy Preview for ngrx-io ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 229c928
🔍 Latest deploy log https://app.netlify.com/sites/ngrx-io/deploys/649335846cdc5b00088e71b1
😎 Deploy Preview https://deploy-preview-3933--ngrx-io.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Member

@timdeschryver timdeschryver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. just a little nit

Copy link
Member

@markostanimirovic markostanimirovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @rosostolato! The code and tests look good to me. A small suggestion for docs:

projects/ngrx.io/content/guide/component-store/read.md Outdated Show resolved Hide resolved
projects/ngrx.io/content/guide/component-store/read.md Outdated Show resolved Hide resolved
Added `equal` option to provide a custom equality function for `distinctUntilChanged` in `select` method.

Closes #3931
@rosostolato
Copy link
Contributor Author

Those were great feedback! Thank you, guys!

Copy link
Member

@markostanimirovic markostanimirovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 Thanks @rosostolato!

@brandonroberts
Copy link
Member

Nice work!

@brandonroberts brandonroberts merged commit c4b5cc5 into ngrx:main Jun 21, 2023
@rosostolato rosostolato deleted the feat/component-store-custom-select-equal-fn branch June 21, 2023 23:20
va-stefanek pushed a commit to va-stefanek/platform that referenced this pull request Jul 16, 2023
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

Successfully merging this pull request may close these issues.

[Component Store] Provide a custom equality function for select
4 participants