lcdsantos / lcdsantos/jQuery-Selectric

Incorrect result when optGroup with multiple

Open
#217 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
715
Forks
149
PR merge metrics
No merged PRs in 30d

Description

an error value get when init a multiple select with optGroup.
I add following code in public/index.html

      <div class="item">
          <select multiple>
            <option>Select with optgroup and multiple</option>
            <optgroup label="Group 1">
              <option>Option 1.1</option>
            </optgroup>
            <optgroup label="Group 2">
              <option selected>Option 2.1</option>
              <option selected>Option 2.2</option>
            </optgroup>
            <optgroup label="Group 3" disabled>
              <option>Option 3.1</option>
              <option>Option 3.2</option>
              <option>Option 3.3</option>
            </optgroup>
          </select>
        </div>

And get an error value after init, like this
image
image

Is this an expected performance?
Thank u for viewing this issue!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the multiple-select with optgroups using the example added to public/index.html, then inspect the select initialization path that handles selected options and optgroups. Confirm the incorrect value and verify that initialization returns the expected selected options without an error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, jquery
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.