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

many to many - Django Rest Framework ManyToMany filter multiple values -

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

Java Entity Manager - JSON reader was expecting a value but found 'db' -