File tree Expand file tree Collapse file tree 2 files changed +11
-10
lines changed
Griddly.NetCore/wwwroot/js Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Original file line number Diff line number Diff line change 769769 event . preventDefault ( ) ;
770770 } , this ) ) ;
771771
772- $ ( "input.pageNumber" , this . $element ) . on ( "change" , $ . proxy ( function ( event )
773- {
772+ $ ( "input.pageNumber" , this . $element ) . on ( "change" , $ . proxy ( function ( event ) {
774773 var value = parseInt ( $ ( event . target ) . val ( ) ) ;
775774
776- if ( value < 1 )
775+ if ( value < 1 || this . options . pageCount == 0 )
777776 value = 1 ;
778777 else if ( value > this . options . pageCount )
779778 value = this . options . pageCount ;
780779
781- this . options . pageNumber = value - 1 ;
782-
783- this . refresh ( ) ;
780+ if ( this . options . pageNumber != value - 1 ) {
781+ this . options . pageNumber = value - 1 ;
782+ this . refresh ( ) ;
783+ }
784784 } , this ) ) ;
785785
786786 $ ( "select.pageSize" , this . $element ) . on ( "change" , $ . proxy ( function ( event )
Original file line number Diff line number Diff line change 773773 {
774774 var value = parseInt ( $ ( event . target ) . val ( ) ) ;
775775
776- if ( value < 1 )
776+ if ( value < 1 || this . options . pageCount == 0 )
777777 value = 1 ;
778778 else if ( value > this . options . pageCount )
779779 value = this . options . pageCount ;
780780
781- this . options . pageNumber = value - 1 ;
782-
783- this . refresh ( ) ;
781+ if ( this . options . pageNumber != value - 1 ) {
782+ this . options . pageNumber = value - 1 ;
783+ this . refresh ( ) ;
784+ }
784785 } , this ) ) ;
785786
786787 $ ( "select.pageSize" , this . $element ) . on ( "change" , $ . proxy ( function ( event )
You can’t perform that action at this time.
0 commit comments