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

fix: Update FilterSelect items when props change #1310

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

olerichter00
Copy link
Contributor

@olerichter00 olerichter00 commented Aug 29, 2023

Addresses ONYX-240

Description

Update FilterSelect items when props change.

@artsy-peril
Copy link
Contributor

artsy-peril bot commented Aug 29, 2023

Warnings
⚠️ Please assign someone to merge this PR, and optionally include people who should review.

Generated by 🚫 dangerJS against 61170b8

contextValue.setItems(props.items)
}
}, [props.items, contextValue])

Copy link
Member

Choose a reason for hiding this comment

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

I wonder if most of this stuff could just be taken out of state and computed in useMemos

Copy link
Member

@dzucconi dzucconi left a comment

Choose a reason for hiding this comment

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

Seems fine to me; though, as I mentioned I do wonder what the minimal amount of data we can keep in state actually is.

@olerichter00 olerichter00 force-pushed the olerichter00/ONYX-240/update-filterselect-items-when-props-change branch from dfd5460 to 61170b8 Compare September 7, 2023 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants