"select" type field with multiple values (still can be dropdown and collapse)

"select" type field with multiple values (still can be dropdown and collapse)

zyq105zyq105 Posts: 17Questions: 4Answers: 0

In an editor, I want to have a field with "select" type being able to select multiple values, and, being able to dropdown and collapse. After using multiple=true option, I can select multiple ones, however, the field area cannot collapse nor dropdown. This is not I want.

I also tried to use select2 type, however, it doesn't allow me to pick multiple values.

Do you have any demo code for want I am looking for? Many thanks!

Replies

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    This thread should help, it's asking the same thing.

    Cheers,

    Colin

  • zyq105zyq105 Posts: 17Questions: 4Answers: 0

    colin, thank you so much for the information! It helps.

    While using the file editor.select2.js, I just found a bug and fixed it. Hope next release you can add the fix code.

    In the line 180, I changed to:
    val = val===null? [] : val.split(conf.separator);

    Without this fix, it will have an error if the val is null and if "separator" is enabled.

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    Many thanks for spotting that and letting me know. I've corrected it in our repo now and it will be deployed to the site soon.

    Allan

Sign In or Register to comment.