1.4.1
Ubuntu 16.04 / Chrome 60
2.4.2
https://jsfiddle.net/6kpt8qna/2/
One alert
Two alerts
current-page
has changed for both Pagination instances, so they both emits a current-change
event. I don't see anything wrong here.
maybe he want to say, when you click 7 number , you will got 4 times alerts
@Leopoldthecoder event must be triggered only with internal changes (click on page number).
@mario56, I want to create two paginators with same reference to page number and same event-listener.
Paginator has internal counter, but event current-change
is triggered by all changes (internal or external): if current-page
changed from other code (e.g. other paginator), current-change
event will triggered.
@zlodes
this.page = 4;
current-page
set by your code. This situation you don't want current-change
event will triggered??
many components has this problem.
@Leopoldthecoder May be a change
event for pagination? Similar to form inputs. 🤣
I was faced with the same problem. A long table with two paginator at the top and bottom. Click on the button invokes the 'current-change' event for the paginator number, associated with a page table
If you want to solve this problem right away, watch the page property (or whatever passed to pagination).
Fair enough, we'll see what we can do.
For now a workaround may be https://jsfiddle.net/6kpt8qna/3/
I'm currently working on this issue and there's something I need advice on.
https://jsfiddle.net/j63ctvh4/
In this demo, when a user selects 200 items/page in the page size Select, the current page will be updated to 5.
If current-change
event only triggers on user input, should it be fired in the above scenario?
Technically this user didn't click any page button, but his action ultimately led to current page change.
If your answer is yes, should the current-change
event be fired when you programmatically change the page size?
Personally my answers to these two questions are: 1. yes and 2. no. I'd like to hear your opinions.
@Leopoldthecoder I agree with you.