The problem of adding full selection option in the use of select2

The
  1. select2 option adds a select all option in addition to some options.

`< select multiple= "" id= "busSelect" >
< option value= "- 1" data-select2-id= "2" > all < / option >
< option value= "227" data-select2-id= "10" > Mobile BU < / option >
< option value= "228" data-select2-id= "11" > computer BU < / option > < option value= "264" data-select2-id= "12" > Wechat Mobile QQ < / option >
< option value= "277" data-select2-id= "13" > first-level customer service < / option >
< / select

  1. option data is dynamic

demand:

  1. Select all, select other items, and click Filter to remove all options from the text box.
  2. Select other items, and then select all. Remove other items in the text box when you click Filter.
  3. structure diagram:

clipboard.png

Select all first, then select other items, and remove all other items from the text box.
Select other items first, then select all, and remove other options from the text box.

Apr.20,2021

have you solved it, brother?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3b0a3-2c255.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3b0a3-2c255.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?