Skip to content

Conversation

@karangattu
Copy link
Collaborator

@karangattu karangattu commented Jul 11, 2024

The selectize test had been disabled/skipped for some time since it was using the same controllers as Input Select even though their implementation is drastically different. This PR adds a revamped controller for selectize instead of using the same one as select or the mixin SelectBase

Select DOM structure
<select class="shiny-input-select form-select shiny-bound-input" id="state">
   <optgroup label="East Coast">
      <option value="NY" selected="">New York</option>
      <option value="NJ">New Jersey</option>
      <option value="CT">Connecticut</option>
   </optgroup>
   <optgroup label="West Coast">
      <option value="WA">Washington</option>
      <option value="OR">Oregon</option>
      <option value="CA">California</option>
   </optgroup>
   <optgroup label="Midwest">
      <option value="MN">Minnesota</option>
      <option value="WI">Wisconsin</option>
      <option value="IA">Iowa</option>
   </optgroup>
</select>
Selectize DOM structure
   <select class="shiny-input-select selectized shiny-bound-input" id="state" multiple="multiple" tabindex="-1" style="display: none;">            
   </select>
   <div class="shiny-input-select selectize-control multi plugin-remove_button">
      <div class="selectize-input items not-full has-options"><input type="text" autocomplete="new-password" autofill="no" tabindex="" id="state-selectized" style="width: 4px; opacity: 1; position: relative; left: 0px;"></div>
      <div class="multi selectize-dropdown shiny-input-select plugin-remove_button" style="display: none; width: 100%; min-width: 300px; top: 36.5px; left: 0px; visibility: visible;">
         <div class="selectize-dropdown-content" tabindex="-1">
            <div class="optgroup" data-group="East Coast">
               <div class="optgroup-header">East Coast</div>
               <div class="option" data-selectable="" data-value="NY">New York</div>
               <div class="option" data-selectable="" data-value="NJ">New Jersey</div>
               <div class="option" data-selectable="" data-value="CT">Connecticut</div>
            </div>
            <div class="optgroup" data-group="West Coast">
               <div class="optgroup-header">West Coast</div>
               <div class="option" data-selectable="" data-value="WA">Washington</div>
               <div class="option" data-selectable="" data-value="OR">Oregon</div>
               <div class="option" data-selectable="" data-value="CA">California</div>
            </div>
            <div class="optgroup" data-group="Midwest">
               <div class="optgroup-header">Midwest</div>
               <div class="option" data-selectable="" data-value="MN">Minnesota</div>
               <div class="option" data-selectable="" data-value="WI">Wisconsin</div>
               <div class="option" data-selectable="" data-value="IA">Iowa</div>
            </div>
         </div>
      </div>
   </div>
   <script type="application/json" data-for="state" data-eval="[]">{"plugins": ["remove_button"]}</script>

@karangattu karangattu marked this pull request as ready for review July 11, 2024 09:37
@karangattu karangattu requested a review from schloerke July 11, 2024 09:37
@schloerke schloerke enabled auto-merge July 12, 2024 14:44
@schloerke schloerke added this pull request to the merge queue Jul 12, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 12, 2024
@schloerke schloerke added this to the v1.0.0 milestone Jul 12, 2024
@karangattu karangattu added this pull request to the merge queue Jul 13, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 13, 2024
@schloerke schloerke enabled auto-merge July 15, 2024 04:34
@schloerke schloerke added this pull request to the merge queue Jul 15, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 15, 2024
@schloerke schloerke enabled auto-merge July 15, 2024 12:58
@schloerke schloerke added this pull request to the merge queue Jul 15, 2024
Merged via the queue into main with commit aa90a27 Jul 15, 2024
@schloerke schloerke deleted the unskip-selectize-test branch July 15, 2024 13:30
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

Successfully merging this pull request may close these issues.

3 participants