Float Label Dropdown

Post Reply
henriquepalato
Posts: 5
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: 453
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: 5
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)?

Post Reply

Return to “Verona - PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest