Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is trying to make
SelectNext
behave closer to the nativeselect
when the items overflow the size of the select itself.For context, this is how a native select looks in that case:
Taking that into consideration, the next changes have been made.
The listbox has changed from
w-full
tomin-w-full
. That way it keeps looking the same as before in most of the cases, but it grows if the content is too long.The toggle button now truncates its content. That ensures there won't be content overflow, and displays ellipsis if the content is just plain text.
When the content is not plain text, consumers might need to adapt their code in order to make it look nice. An example of this is included in the pattern library docs.
Testing steps.
You can check the new examples at the bottom of http://localhost:4001/input-select-next