Skip to content

Commit 66fca4c

Browse files
committed
Trim search input.
1 parent 57073d0 commit 66fca4c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Bootstrap table displays data in a tabular format and offers rich support to rad
2323
- [x] Fix #138: IE8 search data and remove method error.
2424
- [x] Fix bug: sorter does not work in some case.
2525
- [x] Add `bootstrap-table-nl-NL.js` and `bootstrap-table-el-GR.js`.
26-
- [x] Support search without data-field set.
26+
- [x] Support search without data-field set, trim search input.
2727
- [x] Fix #81: Allow the `class` to be applied to the radio or checkbox row.
2828
- [x] Fix #135, #142: Search use formatted data.
2929
- [x] Verify search text before send queryParams.

src/bootstrap-table.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,9 @@
570570
BootstrapTable.prototype.onSearch = function (event) {
571571
var text = $.trim($(event.currentTarget).val());
572572

573+
// trim search input
574+
$(event.currentTarget).val(text);
575+
573576
if (text === this.searchText) {
574577
return;
575578
}

0 commit comments

Comments
 (0)