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

cron - how to properly run Python script with crontab on every system startup -

elasticsearch - Is the order of operations guaranteed in a bulk update? -

Slow performance first queries on SQL Azure -