rkit / react-select2-wrapper

Wrapper for Select2
MIT License
163 stars 97 forks source link

Search field doesnt allow to type the text. #72

Closed smoleniuch closed 7 years ago

smoleniuch commented 7 years ago

Hi, Search field appears but i cant write anything into it.

select2-search-bug

This is my component settings:

var options = [

        {id:"test1",text:'test1'},
        {id:"test2",text:'test2'},
        {id:"test3",text:'test3'},

      ]
var   selectedOption = null,
<Select2
        options={{

          minimumResultsForSearch:1

        }}
        name="test"
        placeholder="select..."
        value={selectedOption}
        data={options}
      />

Here is HTML

<div class="form-box">
   <select name="select-load-balancer-method" placeholder="select..." tabindex="-1" class="select2-hidden-accessible" aria-hidden="true">
      <option value="test1">test1</option>
      <option value="test2">test2</option>
      <option value="test3">test3</option>
   </select>
   <span class="select2 select2-container select2-container--default select2-container--above select2-container--open" dir="ltr" style="width: 679.006px;"><span class="selection"><span class="select2-selection select2-selection--single" role="combobox" aria-haspopup="true" aria-expanded="true" tabindex="0" aria-labelledby="select2-select-load-balancer-method-ss-container" aria-owns="select2-select-load-balancer-method-ss-results" aria-activedescendant="select2-select-load-balancer-method-ss-result-95lu-test2"><span class="select2-selection__rendered" id="select2-select-load-balancer-method-ss-container" title="test2"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span></span></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>
</div>

I couldnt make jsfiddle because i didnt find external cdn select2-react-wrapper library.

@EDIT I have found this gem

reiniermujica commented 6 years ago

just remove tabIndex=-1 from modal