Skip to content

Commit

Permalink
Fixed showColumns cannot work of foundation theme
Browse files Browse the repository at this point in the history
  • Loading branch information
wenzhixin committed Feb 9, 2020
1 parent d654de8 commit b772e6a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ ChangeLog
- **Update:** Fixed `removeAll` bug in the last page when sidePagination is server.
- **Update:** Fixed `search` not always trigger in IE11 bug.
- **Update:** Fixed `search` width `escape` bug.
- **Update:** Fixed `showColumns` cannot work of foundation theme.
- **Update:** Fixed `showFullscreen` bug when setting height.
- **Update:** Fixed `sort` cannot work after searching.
- **Update:** Fixed `sortable` style error when using `table-sm`.
Expand Down
6 changes: 5 additions & 1 deletion src/themes/foundation/bootstrap-table-foundation.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,12 @@ $.BootstrapTable = class extends $.BootstrapTable {
$dropdowns.off('click').on('click', e => {
const $this = $(e.currentTarget)
e.stopPropagation()
$dropdowns.not($this).next().foundation('close')

$this.next().foundation('toggle')

if ($dropdowns.not($this).length) {
$dropdowns.not($this).next().foundation('close')
}
})

$(document).off('click.bs.dropdown.foundation').on('click.bs.dropdown.foundation', () => {
Expand Down
24 changes: 11 additions & 13 deletions src/themes/foundation/bootstrap-table-foundation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,20 @@
height: 2.5293rem;
}

.keep-open {
.dropdown-container {
.button {
&:hover .menu {
background: #fff;
}
.keep-open.dropdown-container {
.button {
&:hover .menu {
background: #fff;
}
}

.menu {
li {
padding: 5px 0;
.menu {
li {
padding: 5px 0;

label {
white-space: nowrap;
text-align: left;
}
label {
white-space: nowrap;
text-align: left;
}
}
}
Expand Down

0 comments on commit b772e6a

Please sign in to comment.