You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As mentioned in #980 and #979 , there are some issues with the concept of a "placeholder" when it comes to <picker-field>. This is meant to essentially work like a <select> in HTML, where the user chooses one of many options. In HTML, <select> doesn't have a placeholder, instead the first option is always selected, and it can have an empty value.
In Hyperview <picker-field> behaves slightly differently on iOS and Android. on Android, we use the system component which acts like the one in HTML. Therefore the placeholder is rendered as the first option with an empty value. On iOS, we render a fake field that when tapped opens a modal with a spinner. In this case, we show the placeholder when the selected value or first value is empty.
To bring consistency across iOS and Android, I suggest we drop the placeholder attribute on <picker-field>. Instead, users can provide a first <picker-item> with an empty value and a suitable label (such as "No selection").
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
As mentioned in #980 and #979 , there are some issues with the concept of a "placeholder" when it comes to
<picker-field>
. This is meant to essentially work like a<select>
in HTML, where the user chooses one of many options. In HTML,<select>
doesn't have a placeholder, instead the first option is always selected, and it can have an empty value.In Hyperview
<picker-field>
behaves slightly differently on iOS and Android. on Android, we use the system component which acts like the one in HTML. Therefore the placeholder is rendered as the first option with an empty value. On iOS, we render a fake field that when tapped opens a modal with a spinner. In this case, we show the placeholder when the selected value or first value is empty.To bring consistency across iOS and Android, I suggest we drop the
placeholder
attribute on<picker-field>
. Instead, users can provide a first<picker-item>
with an empty value and a suitable label (such as "No selection").Beta Was this translation helpful? Give feedback.
All reactions