npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

vue-tables-2 : First and Last Pagination buttons always disabled?

Hello, I received reports that the first and last page pagination buttons are always disabled on a table in one of my applications. After spending some time trying to research this issue, I stumbled upon the demo fiddles on your page that also have this exact issue.

Just like with your fiddles, on the pagination beneath the table, one would expect that if you click the “>>” button you would go to the last page of the data.

Unfortunately if you try this nothing happens. The mouse turns to a disabled icon and the clicks are ignored.

(Thank you for this great plug-in, by the way!)

(You might have posted this in the wrong location, as this is the npm forum rather than matfish2. I have moved your topic to #community:javascript)

My fault. Thank you!

A little further experimentation with vue-tables-2 has cleared up one issue, but still doesn’t address the main problem.

Apparently the “<<” and “>>” buttons jump 10 pages forward or back. Looking at my data, and the example fiddles on matfish2, none of them had more than 10 pages of results.

If there aren’t 10 pages to go forward or backward, the button still shows as active but is disabled. That seems wrong. If there are less than 10 pages to go forward, a user should be advanced to the last page. And if there aren’t 10 pages back, you should be returned to page 1 instead of having those buttons disabled.