Angular Primeng Dropdown with or without filters

Поделиться
HTML-код
  • Опубликовано: 10 сен 2024
  • This Video covers the following topics
    Angular Primeng Dropdown examples
    Angular Primeng Dropdown Filter
    Angular Primeng Dropdown Setting Label and Value
    Angular Primeng Dropdown - Setting Empty Value / Placeholder
    #primeng #angular #p-dropdown #primeng-dropdown #dropdown
    Below is the full playlist of Angular PrimeNG with examples
    • PrimeNG Components and...

Комментарии • 20

  • @ivanconsalter8138
    @ivanconsalter8138 2 года назад +1

    i use dropdow in my project, so it only loads 50 items, can i scrool to get more items? can i use the filter to get data from the entire database? thanks for the tutorial

  • @sona4612
    @sona4612 5 месяцев назад

    Great video❤

  • @fathul6207
    @fathul6207 2 года назад +2

    Hi do you know how to use onchange event with dropdown? so if i choose "a" it will give something like a picture and if i choose "b" it will give me text
    I want to use it like switch case, lmk if you have any idea how to do it
    thanks

    • @haseena.khader
      @haseena.khader  2 года назад

      If you choose a from the dropdown, if the selected item should be image and if it is b, selected item should show as text - if this is the scenario, use custom content section of primefaces.org/primeng/showcase/#/dropdown
      Or if the image or text should be shown somewhere else based on the dropdown change, please do like below
      in component file
      onChange(event) {
      switch(event.value) {
      case 'a': {
      // functionality(or variable) to show the image
      break;
      }
      case 'b': {
      //functionality(or variable) to show the text
      break;
      }
      default: {
      //statements;
      break;
      }
      }
      }

    • @fathul6207
      @fathul6207 2 года назад

      @@haseena.khader thank you so much, im gonna try this

  • @shouaib87
    @shouaib87 2 года назад +1

    Hi do you know how to use showClear to clear filtered datatable selected using a dropdown?

    • @haseena.khader
      @haseena.khader  2 года назад +1

      You can give showClear as true and give onclear function of dropdown and do the functionality in that function

  • @cristianarias9315
    @cristianarias9315 2 года назад

    very useful, thanks

  • @vikaasjerry6926
    @vikaasjerry6926 2 года назад

    Super video keep doing 😊😊

  • @zasussenior1292
    @zasussenior1292 Год назад

    Very nice

  • @610arpitkaushal4
    @610arpitkaushal4 2 года назад

    how to display message if it is not present in the dropdown list ??

    • @haseena.khader
      @haseena.khader  Год назад

      emptyMessage - No records found. Text to display when there is no data. Defaults to global value in i18n translation configuration.
      emptyFilterMessage - No results found Text to display when filtering does not return any results. Defaults to global value in i18n translation configuration.

  • @juliancapponi4788
    @juliancapponi4788 2 года назад

    set a default value in the column filter, not the dropdown, of date????

  • @rahmathidayatullah3822
    @rahmathidayatullah3822 Год назад

    how to setDefaultValue in dropdown .. ?

    • @haseena.khader
      @haseena.khader  Год назад +2

      if your list contains {label: "", value: ""}, please assign that to your variable.
      Example :
      this.selectedCountry = {name: "sdsds", code: "SY"}

    • @rahmathidayatullah3822
      @rahmathidayatullah3822 Год назад

      Thanks replay 🙏

  • @hchinni3842
    @hchinni3842 Год назад

    Primeng documents is not good

  • @Friend503
    @Friend503 Год назад

    Hi , I am using async and await
    "this.Users = await this.homeService.getLocalData(); "
    How to bind the data into dropdown?

    • @haseena.khader
      @haseena.khader  Год назад

      It doesn't make any difference. It will await until that getLocalData returns..you can directly use that