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

Select placeholder #1842

Merged
merged 55 commits into from
Mar 5, 2024
Merged

Select placeholder #1842

merged 55 commits into from
Mar 5, 2024

Conversation

atmgrifter00
Copy link
Contributor

@atmgrifter00 atmgrifter00 commented Feb 20, 2024

Pull Request

🤨 Rationale

👩‍💻 Implementation

The API design present in this PR requires that for a Select to show placeholder text, any option in the set of options in the DOM must set its selected, disabled and hidden attributes. While this is distinct from the conventional API that the HTML select spec suggests, it is in-line with the Open UI Working Group's recommendation.

In addition to now supporting a placeholder, we also now allow the Select to have its value set to that of a disabled option, which is in-line with what the native select supports. The only thing a disabled option prevents is interactive selection of that option.

🧪 Testing

Unit and matrix tests.

✅ Checklist

  • I have updated the project documentation to reflect my changes or determined no changes are needed.

@atmgrifter00 atmgrifter00 changed the title Iniital implementation of Select placeholder Initial implementation of Select placeholder Feb 20, 2024
@atmgrifter00
Copy link
Contributor Author

atmgrifter00 commented Feb 20, 2024

moved to comment

@atmgrifter00 atmgrifter00 linked an issue Feb 23, 2024 that may be closed by this pull request
@atmgrifter00 atmgrifter00 changed the title Initial implementation of Select placeholder Select placeholder Feb 23, 2024
@atmgrifter00 atmgrifter00 marked this pull request as ready for review February 27, 2024 19:26
@atmgrifter00 atmgrifter00 requested a review from rajsite February 27, 2024 20:46
@atmgrifter00 atmgrifter00 merged commit 19643f4 into main Mar 5, 2024
10 checks passed
@atmgrifter00 atmgrifter00 deleted the select-placeholder branch March 5, 2024 22:09
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.

Placeholder for nimble-select when nothing is selected
3 participants