Skip to content

Commit

Permalink
Merge pull request wenzhixin#2801 from appscode/pr
Browse files Browse the repository at this point in the history
Use custom toolbar position
  • Loading branch information
wenzhixin authored Dec 17, 2017
2 parents bf304e7 + 6a6e719 commit ef6ac2c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/bootstrap-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@
singleSelect: false,
toolbar: undefined,
toolbarAlign: 'left',
customToolbar: undefined,
checkboxHeader: true,
sortable: true,
silentSort: true,
Expand Down Expand Up @@ -656,7 +657,12 @@
this.$tableBody = this.$container.find('.fixed-table-body');
this.$tableLoading = this.$container.find('.fixed-table-loading');
this.$tableFooter = this.$container.find('.fixed-table-footer');
this.$toolbar = this.$container.find('.fixed-table-toolbar');
// checking if custom table-toolbar exists or not
if (this.options.customToolbar) {
this.$toolbar = $('body').find(this.options.customToolbar);
} else {
this.$toolbar = this.$container.find('.fixed-table-toolbar');
}
this.$pagination = this.$container.find('.fixed-table-pagination');

this.$tableBody.append(this.$el);
Expand Down

0 comments on commit ef6ac2c

Please sign in to comment.