primefaces: SelectOneMenu: Float Label does not work with selecItem value=null
Describe the bug
Float Label does not work with p:selectOneMenu when there is a converter. Even if there is no value selected, the ui-inputwrapper-filled class is always present.
Reproducer
<div class="field">
<span class="ui-float-label">
<p:selectOneMenu
converter="#{produtoConverter}"
>
<f:selectItem />
</p:selectOneMenu>
<p:outputLabel
for="@previous"
value="AAAAA"
>
</p:outputLabel>
</span>
</div>
Expected behavior
The floating label should appear inside the selectOneMenu when there is nothing selected. The ui-inputwrapper-filled class shoud be set only when a value is selected.
PrimeFaces edition
Community
PrimeFaces version
13.0.2
Theme
default
JSF implementation
Mojarra
JSF version
JavaServer™ Faces 2.2 API
Java version
8
Browser(s)
No response
About this issue
- Original URL
- State: closed
- Created 8 months ago
- Comments: 15 (13 by maintainers)
Commits related to this issue
- Fix #10866: Converter return empty string — committed to melloware/primefaces by melloware 8 months ago
- #10866 (#10885) — committed to primefaces/primefaces by tandraschko 8 months ago
- Fix #10866: 13.0.3 FloatLabel fixes — committed to melloware/primefaces by melloware 8 months ago
- Fix #10866: 13.0.3 FloatLabel fixes (#10890) — committed to primefaces/primefaces by melloware 8 months ago
Thanks it worked!! I’ve been using it the wrong way for like 10 years. Before creating the issue i have looked at the converters on the primefaces github and they have null too, i guess you should update.
That all sounds correct thanks @FlipWarthog