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: country SfSelect overlapping with value #1141

Merged
merged 1 commit into from
Jun 17, 2022

Conversation

sethidden
Copy link
Contributor

this visual issue happens because of the default behavior of the HTML
<select>

If the select's value doesn't match any option, it will display the
first option by default

The problem is that SfSelect (wrapper on top of select) is keeps that
behavior, but moves the form label to the top ONLY if its value prop
is truthy

So it's a collision of two implementations:

  • SfSelect moving label to the top only when value is truthy (or if a
    placeholder exists, but that doesn't fit here)
  • HTML select displays first option if no option with given value is found

The result is the first option being visible with SfSelect label not
moved to the top.

M2-751

this visual issue happens because of the default behavior of the HTML
`<select>`

If the select's value doesn't match any option, it will display the
first option by default

The problem is that SfSelect (wrapper on top of select) is keeps that
behavior, but moves the form label to the top ONLY if its `value` prop
is truthy

So it's a collision of two implementations:
* SfSelect moving label to the top only when value is truthy (or if a
placeholder exists, but that doesn't fit here)
* HTML `select` displays first option if no option with given value is found

The result is the first option being visible with SfSelect label not
moved to the top.

M2-751
@Frodigo Frodigo added this to the 1.0.0-rc.10 milestone Jun 17, 2022
@sethidden sethidden merged commit b27f0e5 into develop Jun 17, 2022
@sethidden sethidden deleted the M2-751-country-name-label-overlaps branch June 17, 2022 13:05
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