Skip to content

Commit

Permalink
Fixed checkAll event bug with sortable checkbox field
Browse files Browse the repository at this point in the history
  • Loading branch information
wenzhixin committed Nov 13, 2019
1 parent e3f5dae commit af2ed31
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ ChangeLog
- **Update:** Fixed `pageSize` set to all bug with filter.
- **Update:** Fixed `jqXHR` `undefined` error using custom ajax.
- **Update:** Fixed `refreshOptions` bug with radio and checkbox.
- **Update:** Fixed `checkAll` event bug with sortable checkbox field.
- **Update:** Fixed checkbox and not-found td style errors.
- **Update:** Fixed `hideUnusedSelectOptions` not work bug for filter-control extension.
- **Update:** Fixed `virtualScroll` option bug with treegrid extension.
Expand Down
5 changes: 3 additions & 2 deletions src/bootstrap-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,9 @@ class BootstrapTable {
}

this.$selectAll = this.$header.find('[name="btSelectAll"]')
this.$selectAll.off('click').on('click', ({currentTarget}) => {
const checked = $(currentTarget).prop('checked')
this.$selectAll.off('click').on('click', e => {
e.stopPropagation()
const checked = $(e.currentTarget).prop('checked')
this[checked ? 'checkAll' : 'uncheckAll']()
this.updateSelected()
})
Expand Down

0 comments on commit af2ed31

Please sign in to comment.