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

Grouped select issue #76

Closed
FoboCasteR opened this issue Aug 15, 2013 · 1 comment
Closed

Grouped select issue #76

FoboCasteR opened this issue Aug 15, 2013 · 1 comment

Comments

@FoboCasteR
Copy link

Example:

<html>
  <head>
    <script src="/jquery-2.0.3.min.js"></script>
    <script src="/selectize.min.js"></script>
    <link rel="stylesheet" type="text/css" href="/selectize.css">
    <style>
      .selectize-control {
        width: 200px;
      }
      select {
        width: 200px;
        height: 150px;
      }
    </style>
  </head>
  <body>
    <select id="selectizable" multiple="true" name="emails[]">
      <optgroup label="Group1">
        <option value="1">Option1</option>
      </optgroup>
      <optgroup label="Group2">
        <option value="2">Option2</option>
      </optgroup>
      <optgroup label="Group3">
        <option value="1">Option1</option>
        <option value="2">Option2</option>
        <option value="3">Option3</option>
      </optgroup>
    </select>
    <select id="selectizable2" multiple="true" name="emails[]">
      <optgroup label="Group1">
        <option value="1">Option1</option>
      </optgroup>
      <optgroup label="Group2">
        <option value="2">Option2</option>
      </optgroup>
      <optgroup label="Group3">
        <option value="1">Option1</option>
        <option value="2">Option2</option>
        <option value="3">Option3</option>
      </optgroup>
    </select>
    <script>
      (function() {
        $('#selectizable').selectize()
      })()
    </script>
  </body>
</html>

Result:
_006

Options with same values was removed.
Bug or RTFM?

@FoboCasteR
Copy link
Author

Thanks! Works good!

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

No branches or pull requests

1 participant