appbaseio / reactivesearch

Search UI components for React and Vue
https://opensource.appbase.io/reactivesearch
Apache License 2.0
4.91k stars 468 forks source link

`innerClass` property passed to components not getting applied in final DOM #1175

Closed tankchintan closed 5 years ago

tankchintan commented 5 years ago

Affected Projects React

Library Version: x.y.z 3.0.2

Describe the bug innerClass is not being applied to the dom elements of MultiDropdownList (& I am sure other components as well)

To Reproduce

Steps to reproduce the behavior:

And this is the generated dom,

  <div class="css-1xdhyk6 e1nzkzy80">
    <div class="css-1mnns6r">
      <button type="button" role="button" aria-label="close menu" aria-expanded="true"
      aria-haspopup="true" data-toggle="true" class="css-1bts2wl e863kyk0" title=
      "Select values">
      <div>
        Select values
      </div>
      </button>

      <ul class="css-1nbh87p">
        <li id="downshift-0-item-0" class="" style=
        "background-color: rgb(255, 255, 255);">
          <div>
            <span>In Death</span><span>&nbsp;(41)</span>
          </div>
        </li>

        <li id="downshift-0-item-1" class="" style=
        "background-color: rgb(255, 255, 255);">
          <div>
            <span>Discworld</span><span>&nbsp;(39)</span>
          </div>
        </li>

        <li id="downshift-0-item-2" class="" style=
        "background-color: rgb(255, 255, 255);">
          <div>
            <span>Stephanie Plum</span><span>&nbsp;(27)</span>
          </div>
        </li>

        <li id="downshift-0-item-3" class="" style=
        "background-color: rgb(255, 255, 255);">
          <div>
            <span>Hercule Poirot</span><span>&nbsp;(25)</span>
          </div>
        </li>

      </ul>
    </div>
  </div>

Expected behavior The dom of the dropdown list should have the class specified in the inner class prop.

  <div class="css-1xdhyk6 e1nzkzy80">
    <div class="css-1mnns6r">
      <button type="button" role="button" aria-label="close menu" aria-expanded="true"
      aria-haspopup="true" data-toggle="true" class="css-1bts2wl e863kyk0" title=
      "Select values">
      <div class="some-title-class">
        Select values
      </div>
      </button>

      <ul class="css-1nbh87p some-list-class">
        <li id="downshift-0-item-0" class="some-list-item-class" style=
        "background-color: rgb(255, 255, 255);">
          <div>
            <span>In Death</span><span>&nbsp;(41)</span>
          </div>
        </li>

        <li id="downshift-0-item-1" class="some-list-item-class" style=
        "background-color: rgb(255, 255, 255);">
          <div>
            <span>Discworld</span><span>&nbsp;(39)</span>
          </div>
        </li>

        <li id="downshift-0-item-2" class="some-list-item-class" style=
        "background-color: rgb(255, 255, 255);">
          <div>
            <span>Stephanie Plum</span><span>&nbsp;(27)</span>
          </div>
        </li>

        <li id="downshift-0-item-3" class="some-list-item-class" style=
        "background-color: rgb(255, 255, 255);">
          <div>
            <span>Hercule Poirot</span><span>&nbsp;(25)</span>
          </div>
        </li>

      </ul>
    </div>
  </div>

Screenshots

Desktop (please complete the following information):

bietkul commented 5 years ago

It works you should use innerClass instead of innerClassName. https://codesandbox.io/embed/multidropdownlist-f4xrk

tankchintan commented 5 years ago

Wow, don't know how I missed that! Thanks!