|
|
@@ -394,12 +394,15 @@
|
|
|
return res
|
|
|
},
|
|
|
totalField: 'total',
|
|
|
+ totalNotFilteredField: 'totalNotFiltered',
|
|
|
dataField: 'rows',
|
|
|
pagination: false,
|
|
|
onlyInfoPagination: false,
|
|
|
+ showExtendedPagination: false,
|
|
|
paginationLoop: true,
|
|
|
sidePagination: 'client', // client or server
|
|
|
totalRows: 0,
|
|
|
+ totalNotFiltered: 0,
|
|
|
pageNumber: 1,
|
|
|
pageSize: 10,
|
|
|
pageList: [10, 25, 50, 100],
|
|
|
@@ -554,7 +557,11 @@
|
|
|
formatRecordsPerPage (pageNumber) {
|
|
|
return `${pageNumber} rows per page`
|
|
|
},
|
|
|
- formatShowingRows (pageFrom, pageTo, totalRows) {
|
|
|
+ formatShowingRows (pageFrom, pageTo, totalRows, totalNotFiltered) {
|
|
|
+ if (totalNotFiltered !== undefined && totalNotFiltered > 0 && totalNotFiltered < totalRows) {
|
|
|
+ return `Showing ${pageFrom} to ${pageTo} of ${totalRows} rows (filtered from ${totalNotFiltered} total entries)`
|
|
|
+ }
|
|
|
+
|
|
|
return `Showing ${pageFrom} to ${pageTo} of ${totalRows} rows`
|
|
|
},
|
|
|
formatDetailPagination (totalRows) {
|
|
|
@@ -1518,9 +1525,17 @@
|
|
|
this.pageTo = o.totalRows
|
|
|
}
|
|
|
|
|
|
+ if (this.options.pagination && this.options.sidePagination !== 'server') {
|
|
|
+ this.options.totalNotFiltered = this.options.data.length
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!this.options.showExtendedPagination) {
|
|
|
+ this.options.totalNotFiltered = undefined
|
|
|
+ }
|
|
|
+
|
|
|
const paginationInfo = o.onlyInfoPagination ?
|
|
|
o.formatDetailPagination(o.totalRows) :
|
|
|
- o.formatShowingRows(this.pageFrom, this.pageTo, o.totalRows)
|
|
|
+ o.formatShowingRows(this.pageFrom, this.pageTo, o.totalRows, o.totalNotFiltered)
|
|
|
|
|
|
html.push(`<div class="${this.constants.classes.pull}-${o.paginationDetailHAlign} pagination-detail">
|
|
|
<span class="pagination-info">
|
|
|
@@ -2634,6 +2649,10 @@
|
|
|
this.options.totalRows = data[this.options.totalField]
|
|
|
}
|
|
|
|
|
|
+ if (this.options.pagination && this.options.sidePagination === 'server') {
|
|
|
+ this.options.totalNotFiltered = data[this.options.totalNotFilteredField]
|
|
|
+ }
|
|
|
+
|
|
|
fixedScroll = data.fixedScroll
|
|
|
data = Array.isArray(data) ? data : data[this.options.dataField]
|
|
|
|