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

Copy of #4324 for release #4329

Closed
wants to merge 3 commits into from
Closed

Copy of #4324 for release #4329

wants to merge 3 commits into from

Conversation

siddharthkp
Copy link
Member

ipc103 and others added 3 commits February 28, 2024 18:54
Towards #4315

The SelectPanel only did a basic equality check for the item state, meaning
that it depended on having the exact same objects on multiple pass throughs.

This isn't always possible as sometimes you may want to have different objects.

This replaces the equality check with a test for an `id` property on the object.

If the `id` property isn't present, we fallback to the old behavior.

Note that a previous version used the `key` prop, but we decided `id` was a
better interface. ipc103@f472da2#r139163795
Co-authored-by: Andrew Henry <[email protected]>
Towards #4315

The SelectPanel only did a basic equality check for the item state, meaning
that it depended on having the exact same objects on multiple pass throughs.

This isn't always possible as sometimes you may want to have different objects.

This replaces the equality check with a test for an `id` property on the object.

If the `id` property isn't present, we fallback to the old behavior.

Note that a previous version used the `key` prop, but we decided `id` was a
better interface. ipc103@f472da2#r139163795
Co-authored-by: Andrew Henry <[email protected]>
Copy link

changeset-bot bot commented Feb 29, 2024

🦋 Changeset detected

Latest commit: f916ed6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 113.57 KB (+0.04% 🔺)
packages/react/dist/browser.umd.js 114.24 KB (+0.04% 🔺)

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.

2 participants