edge / wallet

The web wallet of the XE Blockchain.
https://wallet.xe.network
Other
6 stars 4 forks source link

Prevent auto-rerender on sorting/changing page #200

Open willgarrett64 opened 2 years ago

willgarrett64 commented 2 years ago

When using pagination to change page of a table, or changing the sorting of a table, it uses vue-router to change the query, which in turns re-renders the page.

This causes some undesired effects:

The expected result is for the table content to update, but the overall page doesn't re-render.

willgarrett64 commented 2 years ago

@annybs - Hey Anny, one for when you're back maybe:

I've tried and tried to find a solution, but nothing seems to work. I can use window.history.pushState() to silently update the url, but the problem I had with this is that the url is updated, but not the $route object, meaning the table data isn't updated.

So many forums suggest using this.$router.replace() (instead of .push(), but this doesn't prevent re-rendering for me. From what I understand, all this does is replace the current history entry rather than adding a new one.

Anyway, I thought maybe you'd have an idea on how to resolve this, or at least work out a solution a lot quicker then me.

adamkdean commented 1 year ago

@annybs @willgarrett64 could you both give an update on this ticket? Thanks