I am using a select2 component for selection.
I fiddled an example together here: https://fiddle.jshell.net/mmo2dqno/15/
What I am trying to do is:
This works fine. The problem is, that when one item is selected, the searchbox isn't showing the placeholder attribute anymore.
How can I tell the browser to assume the input as empty and show the placeholder again?
You could kill the select2 plugin with JS, and then load it again. Or you could use Js to choose an disabled placeholder option.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.