Trim doesn't call with pagy_nav_js when first page is active #655
-
On pagy_bootstrap_nav_js. When page=1 is active, item is a String https://github.com/ddnexus/pagy/blob/master/lib/javascripts/pagy-dev.js#L32 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You mean that the bootstrap trimming is skipped on page 1 when it's active. That works for all the framework extras because either they have a The way trimming works is that usually you have the first page url called without any page param (it's implicit page 1 by default), when you are in any other page, the link to page 1 gets trimmed (since the page is not the active one, and clicking on it you want to remove page 1). Even in bootstrap, if you go to page 2, then click on the link of page 1, you don't see the That is a bug, because it should not happen. But the bug seems to be on the HTML side: the page should not be linked to itself at all. Then we could even make the javascript more robust for any framework that does not behave like we would expect. We should also remove the Thank you for reporting it! I created an issue out of this! |
Beta Was this translation helpful? Give feedback.
You mean that the bootstrap trimming is skipped on page 1 when it's active.
That works for all the framework extras because either they have a
a
tag withouthref
orhref="#"
or they are disabled links, or they don't even have a link for the active page. Bootstrap has an active and complete URL to the active page which seems wrong!The way trimming works is that usually you have the first page url called without any page param (it's implicit page 1 by default), when you are in any other page, the link to page 1 gets trimmed (since the page is not the active one, and clicking on it you want to remove page 1). Even in bootstrap, if you go to page 2, then click on the link of page 1, you don'…