creativetimofficial / bootstrap-vue-argon-dashboard

107 stars 514 forks source link

[Bug] base-pagination component doesn't work properly #10

Open validol4ik opened 2 years ago

validol4ik commented 2 years ago

Version

1.0.0

Operating System

Ubuntu 21.04

Device

Laptop Acer

Browser & Version

Chrome 99.0.4844.74 (Official Build) (64-bit)

Steps to reproduce

  1. Open any page with pagination
  2. Add watcher on currentPage option and console.log new value of the option
  3. If you change currentPage in the code you will see changes on the page
  4. But if you change the current page in pagination on the page you will see in the console that the currentPage option hasn't changed

    What is expected?

    When you select page, the currentPage option in the data must be changed

    What is actually happening?

    currentPage doesn't change because v-model doesn't work (to create v-model on a component you must use prop value and event @input in Vue 2)


Solution

Change the emit event from @change to @input on the base-pagination component

Additional comments

I just added my method for changing the current page using @change event of base-pagination component. But It's not good...