Skip to content

Commit

Permalink
wc: Render a pagination container in grid toolbar #TASK-7216 #TASK-7100
Browse files Browse the repository at this point in the history
  • Loading branch information
jmjuanes committed Jan 9, 2025
1 parent d7fdadb commit 00e8dde
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/webcomponents/variant/variant-browser-grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,9 @@ export default class VariantBrowserGrid extends LitElement {
pageSize: this._config.pageSize,
pageList: this._config.pageList,
paginationVAlign: "bottom",
formatShowingRows: (pageFrom, pageTo, totalRows) =>
this.gridCommons.formatShowingRows(pageFrom, pageTo, totalRows, this.totalRowsNotTruncated, this.isApproximateCount),
formatShowingRows: (pageFrom, pageTo, totalRows) => {
return this.gridCommons.formatShowingRows(pageFrom, pageTo, totalRows, this.totalRowsNotTruncated);
},
detailView: this._config.detailView,
detailFormatter: this.detailFormatter,
loadingTemplate: () => GridCommons.loadingFormatter(),
Expand Down Expand Up @@ -1030,12 +1031,19 @@ export default class VariantBrowserGrid extends LitElement {
LitUtils.dispatchCustomEvent(this, "gridconfigsave", this.__config || {});
}

renderToolbarLeftContent() {
return html`
<span id="${this.gridId + "Pagination"}"></span>
`;
}

render() {
return html`
${this._config?.showToolbar ? html`
<opencb-grid-toolbar
.query="${this.query}"
.opencgaSession="${this.opencgaSession}"
.leftContent="${this.renderToolbarLeftContent()}"
.settings="${this.toolbarSetting}"
.config="${this.toolbarConfig}"
@columnChange="${this.onColumnChange}"
Expand Down

0 comments on commit 00e8dde

Please sign in to comment.