Skip to content

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.

3 participants