The autocomplete input nobody is using (HTML datalist tag)

Поділитися
Вставка
  • Опубліковано 29 вер 2024

КОМЕНТАРІ • 14

  • @federicobau8651
    @federicobau8651 3 роки тому

    That's interesting, is one of the many tags that in HTML you will never use, but you never know may need one day, or if I see it somewhere now I what it is

  • @johanneskingma
    @johanneskingma 2 роки тому

    Yeah, DataList is cool. One Problem though, as soon as a value is entered the dropdown magic looses its power. So you can forget a default value for the input field it will hide the drop down

    • @CodeVault
      @CodeVault  2 роки тому

      Yea, I wish there was some better default implementation across browsers for such things. In the end, in production-ready projects, we end up making our own autocomplete or using an existing third-party library

  • @tsoft9147
    @tsoft9147 3 роки тому

    Using Already it But The Problem is Scroll not working with down arrow key Please Help

    • @CodeVault
      @CodeVault  3 роки тому

      Hmm, you mean navigating the options of autocomplete?

    • @tsoft9147
      @tsoft9147 3 роки тому

      @@CodeVault with down arrow key scroll not automatically working

  • @IBITZEE
    @IBITZEE 3 роки тому

    thx!!!

  • @مقاطعمترجمة-ش8ث
    @مقاطعمترجمة-ش8ث 2 роки тому

    6:10 so how to make it autoselect ?

    • @CodeVault
      @CodeVault  2 роки тому

      You'd need a custom input for that with some JavaScript code that does this for you. One way is to just clear the input if the user types in anything that is not inside that select list

  • @dorkas123456
    @dorkas123456 3 роки тому

    So what if i wanna search datalist by attribute of option which is not displayed? Is that possible?

  • @birdofhermes6152
    @birdofhermes6152 3 роки тому

    Never knew about this tag before

  • @mdsafikulislam9113
    @mdsafikulislam9113 3 роки тому

    Thanks!!