Float Label Dropdown

Forum rules
Please note that response time for technical support is within 3-5 business days.
Post Reply
henriquepalato
Posts: 6
Joined: 12 Jun 2017, 19:14

10 Jul 2018, 04:36

Hello Friends,

Is there any way I can use the Float Label in a Dropdown?

Regards,

Henrique Palato

merve7
Posts: 861
Joined: 12 Sep 2017, 10:44

12 Jul 2018, 15:03

Please use like this;

Code: Select all

<span class="ui-float-label">
    <p-dropdown id="float-input" [autoDisplayFirst]="false" [options]="cities1" [(ngModel)]="selectedCity1" [autoWidth]="false"></p-dropdown>
    <label for="float-input">Username</label>
</span>
and see autoDisplayFirst (Whether to display the first item as the label if no placeholder is defined and value is null.) definition in https://www.primefaces.org/primeng/#/dropdown
Please, if you have, remove null value of option .

henriquepalato
Posts: 6
Joined: 12 Jun 2017, 19:14

18 Jul 2018, 22:07

Thanks

vishal4799
Posts: 1
Joined: 29 Mar 2019, 16:02

04 May 2019, 17:33

With floating label dropdown, how to unset dropdown value once user selected any value (mistakenly for optional dropdown)?

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

10 Oct 2020, 03:17

Hi,

Sorry for the delayed response. We have made some improvements in this regard. Please see our demo page;
https://primefaces.org/primeng/showcase/#/floatlabel

Best Regards,

Post Reply

Return to “Verona - PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests