File tree Expand file tree Collapse file tree 2 files changed +14
-10
lines changed Expand file tree Collapse file tree 2 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -1103,11 +1103,13 @@ export default {
11031103
11041104 pageChanged (pagination ) {
11051105 this .currentPage = pagination .currentPage ;
1106- const pageChangedEvent = this .pageChangedEvent ();
1107- pageChangedEvent .prevPage = pagination .prevPage ;
1108- this .$emit (' on-page-change' , pageChangedEvent);
1109- if (this .mode === ' remote' ) {
1110- this .$emit (' update:isLoading' , true );
1106+ if (! pagination .noEmit ) {
1107+ const pageChangedEvent = this .pageChangedEvent ();
1108+ pageChangedEvent .prevPage = pagination .prevPage ;
1109+ this .$emit (' on-page-change' , pageChangedEvent);
1110+ if (this .mode === ' remote' ) {
1111+ this .$emit (' update:isLoading' , true );
1112+ }
11111113 }
11121114 },
11131115
Original file line number Diff line number Diff line change @@ -144,7 +144,7 @@ export default {
144144 if (pageNumber > 0 && this .total > this .currentPerPage * (pageNumber - 1 )) {
145145 this .prevPage = this .currentPage ;
146146 this .currentPage = pageNumber;
147- if (emit) this .pageChanged ();
147+ this .pageChanged (emit );
148148 }
149149 },
150150
@@ -167,11 +167,13 @@ export default {
167167 },
168168
169169 // Indicate page changing
170- pageChanged () {
171- this . $emit ( ' page-changed ' , {
170+ pageChanged (emit = true ) {
171+ const payload = {
172172 currentPage: this .currentPage ,
173173 prevPage: this .prevPage ,
174- });
174+ };
175+ if (! emit) payload .noEmit = true ;
176+ this .$emit (' page-changed' , payload);
175177 },
176178
177179 // Indicate per page changing
@@ -181,7 +183,7 @@ export default {
181183 // * only emit if this isn't first initialization
182184 this .$emit (' per-page-changed' , { currentPerPage: this .currentPerPage });
183185 }
184- this .changePage (1 , true );
186+ this .changePage (1 , false );
185187 },
186188
187189 // Handle per page changing
You can’t perform that action at this time.
0 commit comments