File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,9 +32,9 @@ const DynamicForm = React.forwardRef(
3232 onSumbitButtonPress ( ) ;
3333 } ,
3434 nextPage : function ( ) {
35- if ( currentIndex < formTemplate . data . length - 1 ) {
36- scrollToIndex ( currentIndex + 1 ) ;
37- setCurrentIndex ( currentIndex + 1 ) ;
35+ if ( activePage < formTemplate . data . length - 1 ) {
36+ scrollToIndex ( activePage + 1 ) ;
37+ // setCurrentIndex(currentIndex + 1);
3838 }
3939 }
4040 } ) ) ;
@@ -151,6 +151,7 @@ const DynamicForm = React.forwardRef(
151151 const scrollPosition = event . nativeEvent . contentOffset . x ; // Current scroll position
152152 const currentPage = Math . round ( scrollPosition / deviceWidth ) ; // Calculate active page
153153 setActivePage ( currentPage ) ; // Update active page
154+ console . log ( 'FormBuilder:currentPage' , currentPage ) ;
154155 setCurrentPage && setCurrentPage ( currentPage ) ;
155156 } ;
156157
You can’t perform that action at this time.
0 commit comments