svelte-simple-datatables icon indicating copy to clipboard operation
svelte-simple-datatables copied to clipboard

Add Select/Option or any HTML Input below thead for filtering

Open dukenmarga opened this issue 3 years ago • 0 comments

Hello,

Currently column filter is only possible as text input field. I'm trying to insert select/option input field to make a filtering. But, I notice that this select field will not be shown in the header (thead).

Is there any way to inject this HTML input to the header of the table? This below what I'm trying to achieve.

  <thead>
      <tr>
          <th data-key="houseID">ID Pelanggan</th>
          <th data-key="name">Nama</th>
      </tr>
      <tr>
          <th>
              <select id="houseIDFilter">
                <option value="volvo">Volvo</option>
                <option value="saab">Saab</option>
              </select>
          </th>
          <th>
              <input type="text" id="nameFilter" />
          </th>
      </tr>
  </thead>

image

Thank you

dukenmarga avatar Nov 24 '22 09:11 dukenmarga