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: Allow SelectMultiple to have either a label or placeholder prop #3952

Merged
merged 2 commits into from
Nov 14, 2024

Conversation

DafyddLlyr
Copy link
Contributor

@DafyddLlyr DafyddLlyr commented Nov 14, 2024

Alternate implementation of #3927

Visually the same, but relies on more simplified and strict type checking in the component to allow either label or placeholder to be passed as props.

Screen.Recording.2024-11-14.at.10.37.54.mov

@DafyddLlyr DafyddLlyr changed the title dp/flag select placeholder feat: Allow SelectMultiple to have either a label or placeholder prop Nov 14, 2024
return (
<FormControl sx={{ display: "flex", flexDirection: "column" }}>
<StyledAutocomplete<T, true, true, false, "div">
sx={{ mt: props.label ? 2 : 0 }}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Handling this within the styled component is surprisingly complex from a type POV! Managing it here feels like a sensible compromise 👍

Copy link

github-actions bot commented Nov 14, 2024

Removed vultr server and associated DNS entries

Copy link
Member

@jessicamcinchak jessicamcinchak left a comment

Choose a reason for hiding this comment

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

Perfect & simpler, thank you!!

@DafyddLlyr DafyddLlyr merged commit 16f38b3 into main Nov 14, 2024
12 checks passed
@DafyddLlyr DafyddLlyr deleted the dp/flag-select-placeholder branch November 14, 2024 11:24
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