Skip to content

Commit

Permalink
fix #944 NPE at AdvancedPaginationPlugin
Browse files Browse the repository at this point in the history
  • Loading branch information
vegegoku committed Jul 15, 2024
1 parent aa16bd3 commit 57e42b0
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package org.dominokit.domino.ui.pagination;

import static java.util.Objects.isNull;
import static java.util.Objects.nonNull;
import static org.dominokit.domino.ui.utils.Domino.*;

Expand Down Expand Up @@ -133,7 +134,9 @@ public AdvancedPagination(int pages, int pageSize) {
pagesSelect =
Select.<Integer>create()
.addChangeListener(
(oldValue, newValue) -> moveToPage(newValue, isChangeListenersPaused()));
(oldValue, newValue) -> {
moveToPage(isNull(newValue) ? 1 : newValue, isChangeListenersPaused());
});

pagesList.insertAfter(
PagerNavItem.create(pagesSelect)
Expand Down

0 comments on commit 57e42b0

Please sign in to comment.