I have a table with the search clear button enabled,
but I would like to change the icon from fa-trash
to fa-undo
.
I tried below but that doesn't work.
<table id="table"
data-icons="{ clearSearch: 'fa-undo' }"
data-search="true"
data-show-search-clear-button="true">
Is there an way to only change the clearSearch
icon being used via the data-icons attribute? Or is there another way to do it?
I have overridden the clearSearch
globally using:
$.extend($.fn.bootstrapTable.defaults.icons, {
clearSearch: 'fa-undo'
});