bootstrap-table
bootstrap-table copied to clipboard
Add a `searchClearButtonSelector`
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](https://user-images.githubusercontent.com/197004/191098705-4800d030-4536-4eea-b692-7c8446d0c18b.png)
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>