bootstrap-table icon indicating copy to clipboard operation
bootstrap-table copied to clipboard

Add a `searchClearButtonSelector`

Open marceloverdijk opened this issue 1 year ago • 0 comments

Description

Add a searchClearButtonSelector option.

Together with the existing searchSelector this would make it very easy to create a different looking search bar without having to write any custom javascript.

E.g.:

image

Example html:

<form class="form-group form-group-light">
  <input id="customSearch" class="form-control" type="text" placeholder="Text input">
  <button id="customSearchClearButton" type="button" class="btn btn-primary">X</button>
</form>

<table
  id="table"
  data-toggle="table"
  data-search="true"
  data-search-selector="#customSearch"
  data-search-clear-button-selector="#customSearchClearButton"
  data-url="json/data1.json">
  <thead>
    <tr>
      <th data-field="id">ID</th>
      <th data-field="name">Item Name</th>
      <th data-field="price">Item Price</th>
    </tr>
  </thead>
</table>

marceloverdijk avatar Sep 19 '22 19:09 marceloverdijk