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

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

matplotlib support failed in PyCharm on OSX -

python - Matplotlib: TypeError: 'AxesSubplot' object is not callable -