Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Select form control multiselect #280

Open
MitchellVermaning opened this issue Jul 8, 2020 · 0 comments
Open

Feature: Select form control multiselect #280

MitchellVermaning opened this issue Jul 8, 2020 · 0 comments

Comments

@MitchellVermaning
Copy link

Hello,

Thank you for this great library.

I added to a new form control the attribute multiple on the HTML element select (form/select.js). When I set two options to selected, only the last selected option will be highlighted.

--

HTML preview:
image

HTML rendered the following code:
image

--

To reproduce this problem:

  1. Copy the code from form/select.js.
  2. Add multiple: true to attrs. Like:
    image
  3. Add the following options:
[
    {
      label: "test1",
      value: "test1",
      selected: true
    }, {
      label: "test2",
      value: "test2",
      selected: true
    }, {
      label: "test3",
      value: "test3",
    }
]
  1. When you rendered the form, only option test2 will be selected. While the HTML code has selected test1 and test2.

Do you have any idea how I can resolve this problem? Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant