Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vue-tables-2 emit page number to parent component

I've been trying to find a way of getting the page number from vue-tables-2 but I couldn't figure it out. My best guess was with Vuex but I couldn't get it to work either. I just find the documentation very briefed and not detailed enough for newbies to Vue like me.

Is there anyone who managed to get it working or at least a similar tutorial.

Any help will be greatly appreciated!

like image 924
Genov Avatar asked Dec 03 '25 20:12

Genov


1 Answers

Vue tables 2 has a vue-tables.pagination custom event which is fired on page change. You can use it to track the current page.

Alternatively you can dive into the instance itself (If you are not using vuex) and fetch the Page data property (E.g this.$refs.myTable.Page)

like image 71
Matanya Avatar answered Dec 05 '25 09:12

Matanya



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!