Floating label dropdown works partially

Forum rules
Please note that response time for technical support is within 3-5 business days.
Post Reply
User avatar
zollrrak
Posts: 21
Joined: 02 Aug 2013, 17:42
Location: Bogotá, Colombia

20 Mar 2018, 18:01

Hi,

According to https://github.com/primefaces/primeng/issues/4578 floating label feature is available for dropdown, however when I use 'ui-float-label' class I can evidence two problems:

1) styles for msg error and label are not displayed correctly (check difference between email field and position field)
2) label of dropdown stays on floating position when I select the empty option after I have selected other option

Image

When I use 'md-inputfield' class the dropdown is not displayed correctly, neither the error styles:

Image
Image

Tested in:
-primeng 5.2.2 & 5.2.3
-ultima theme 5.2.0

regards,

Carlos

sleitzinger
Posts: 2
Joined: 10 Feb 2018, 19:22

21 Mar 2018, 19:59

Same problem here. The float labels need to be fixed.

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

16 May 2018, 09:19

We'll check and get back to you.

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

21 May 2018, 09:31

Could you please try it after making the following change?

Code: Select all

_form.scss

//line 58
   label:not(.ui-dropdown-label) {      /* instead of label */
     ...
   }
Then, please provide new theme css using SASS command.

My test code;

Code: Select all

//html
                <span class="md-inputfield">
                        <p-dropdown [options]="cities" [(ngModel)]="selectedCity1" [autoWidth]="false"></p-dropdown>
                        <label>Select City</label>
                        <div class="ui-message ui-messages-error ui-corner-all">
                            This field is required
                        </div>
                    </span>
                    
//ts
this.cities = [];
        this.cities.push({label: '', value: 0}); /* it is empty for label animation */
        this.cities.push({label: 'New York', value: {id: 1, name: 'New York', code: 'NY'}});
        this.cities.push({label: 'Rome', value: {id: 2, name: 'Rome', code: 'RM'}});
        this.cities.push({label: 'London', value: {id: 3, name: 'London', code: 'LDN'}});
        this.cities.push({label: 'Istanbul', value: {id: 4, name: 'Istanbul', code: 'IST'}});
        this.cities.push({label: 'Paris', value: {id: 5, name: 'Paris', code: 'PRS'}});
1) styles for msg error and label are not displayed correctly (check difference between email field and position field)
- I couldn't replicate it. Please try the latest ultima version.

Best Regards,

Post Reply

Return to “Ultima - PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests