8000 fix(extension): fix #3720, fix #3682, bug with export extension together · pythonAI/bootstrap-table@53b9c80 · GitHub
[go: up one dir, main page]

Skip to content

Commit 53b9c80

Browse files
committed
fix(extension): fix wenzhixin#3720, fix wenzhixin#3682, bug with export extension together
1 parent b9be43a commit 53b9c80

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/extensions/toolbar/bootstrap-table-toolbar.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,22 +73,24 @@
7373

7474
$.BootstrapTable = class extends $.BootstrapTable {
7575
initToolbar () {
76+
const o = this.options
77+
78+
this.showToolbar = this.showToolbar || o.search && o.advancedSearch && o.idTable
79+
7680
super.initToolbar()
7781

78-
const o = this.options
7982
if (!o.search || !o.advancedSearch || !o.idTable) {
8083
return
8184
}
8285

83-
this.$toolbar.prepend(`
84-
<div class="columns columns-${o.buttonsAlign} btn-group pull-${o.buttonsAlign}" role="group">
86+
this.$toolbar.find('>.btn-group').append(`
8587
<button class="btn btn-default${Utils.sprintf(' btn-%s', o.buttonsClass)}${Utils.sprintf(' btn-%s', o.iconSize)}"
8688
type="button"
8789
name="advancedSearch"
8890
aria-label="advanced search"
8991
title="${o.formatAdvancedSearch()}">
9092
<i class="${o.iconsPrefix} ${o.icons.advancedSearchIcon}"></i>
91-
</button></div>
93+
</button>
9294
`)
9395

9496
this.$toolbar.find('button[name="advancedSearch"]').off('click').on('click', () => this.showAvdSearch())

0 commit comments

Comments
 (0)
0