bug: filter icons appearing twice
What version of MyFinances are you currently using?
latest
What device type are you currently facing the issue on?
No response
Describe the bug
Filter icons on invoice page are showing up twice per col
I have tested it and can't reproduce this, either it has already been fixed by a page effect or it is due to something else, please give me some more information such as
- which browser are you using and in which version?
- does this bug only occur with a certain number of Invoices ?
please give us as much information as possible that can be reproduced or adjusted
I reproduced the bug.
Step 1: Click overview on any item
Step 2: Go to the overview page and return to the original page list
Step 3: You can see a filter button superimposed
I recognized if you refresh the page, or create a new invoice the filter icon set backs to one icon. The problem occurese always, even if you have no invoices.
I'm trying to fix the bug right now, but I saw @TreyWW that you add hx-boost="true" in frontend/templates/pages/invoices/dashboard/manage.html. In case of solving the problem it leads to a new bug. Deleting didn't break the code, but I would like to ask you first what your intention was with hx-boost="true".
Hey @io-95,
HX-Boost allows for the content to be swapped without having to fully refresh the page but still allows 'normal' navigation. I would guess that the filter icon state doesn't clear when you change page, so when going back it gets appended?
Ideally we won't have to remove the HX-Boost
The new problem occures when the user comes back from the overview page to the dashboards over the "back to page" button. in this case the page is reloaded but for the js file it looks like the page is loaded from the cache, so it doesn't initialize the filter icons. And this happens due to the hx-boost, if I understand the code right.
I gues it could help if I explain my approach. My approach is to check if the page is initialized for the first time or loaded from the cache, to avoid that the icon are loaded more then once.