javascript - Select2 Always show placeholder -


i using select2 component selection.

i fiddled example here: https://fiddle.jshell.net/mmo2dqno/15/

what trying is:

  • select item via select2 widget
  • show item in div below
  • dont show label in search box.

this works fine. problem is, when 1 item selected, searchbox isn't showing placeholder attribute anymore.

how can tell browser assume input empty , show placeholder again?

you kill select2 plugin js, , load again. or use js choose disabled placeholder option.


Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -