Added permanent link of first page to pagination

This commit is contained in:
sairaj mote 2023-05-16 04:38:09 +05:30
parent 48e9ee1fd7
commit 84b46e5617

View File

@ -1949,7 +1949,13 @@
} }
if (paginationSegments > 1) { if (paginationSegments > 1) {
for (let i = 1; i <= paginationSegments; i++) { for (let i = 1; i <= paginationSegments; i++) {
if (startingPage <= i && i <= showTill) { if (i === 1) {
pagination.push(html`
<a href=${`#/search?type=address&query=${address}&page=${i}`} class=${`pagination__item ${i === page ? 'pagination__item--active' : ''}`}>
${i}
</a>
`)
} else if (startingPage <= i && i <= showTill) {
pagination.push(html` pagination.push(html`
<a href=${`#/search?type=address&query=${address}&page=${i}`} class=${`pagination__item ${i === page ? 'pagination__item--active' : ''}`}> <a href=${`#/search?type=address&query=${address}&page=${i}`} class=${`pagination__item ${i === page ? 'pagination__item--active' : ''}`}>
${i} ${i}
@ -1962,6 +1968,9 @@
} }
} }
} }
if (startingPage > 2) {
pagination.splice(1, 0, html` <div class="pagination__item">...</div> `);
}
renderElem(getRef('pagination_wrapper'), html`${pagination}`) renderElem(getRef('pagination_wrapper'), html`${pagination}`)
}, },
availableAssetOptions() { availableAssetOptions() {