@@ -226,7 +226,7 @@ define([
226226
227227 // reset index checkbox event
228228 $ ( document ) . on ( 'change' , this . wrapSelector ( '#vp_gbResetIndex' ) , function ( ) {
229- that . state . resetIndex = $ ( this ) . val ( ) == 'yes' ;
229+ that . state . resetIndex = $ ( this ) . prop ( 'checked' ) ;
230230 } ) ;
231231
232232 //====================================================================
@@ -615,7 +615,7 @@ define([
615615 // Grouper
616616 if ( useGrouper ) {
617617 byStr = com_util . formatString ( "pd.Grouper(key={0}, freq='{1}')" , byStr , grouperNumber + grouperPeriod ) ;
618- } else if ( resetIndex == true ) {
618+ } else if ( resetIndex === true ) {
619619 // as_index option cannot use with Grouper -> use .reset_index() at the end
620620 byStr += ', as_index=False' ;
621621 }
@@ -787,7 +787,6 @@ define([
787787 $ ( this . wrapSelector ( '#vp_gbVariable' ) ) . val ( variable ) ;
788788 $ ( this . wrapSelector ( '#vp_gbBy' ) ) . val ( groupby . map ( col => col . code ) . join ( ',' ) ) ;
789789 $ ( this . wrapSelector ( '#vp_gbBy' ) ) . data ( 'list' , groupby ) ;
790- $ ( this . wrapSelector ( '#vp_gbResetIndex' ) ) . val ( resetIndex ?'yes' :'no' ) ;
791790 if ( useGrouper ) {
792791 $ ( this . wrapSelector ( '#vp_gbByGrouper' ) ) . removeAttr ( 'disabled' ) ;
793792 $ ( this . wrapSelector ( '#vp_gbByGrouper' ) ) . prop ( 'checked' , useGrouper ) ;
@@ -805,6 +804,7 @@ define([
805804 }
806805 $ ( this . wrapSelector ( '#vp_gbAllocateTo' ) ) . val ( allocateTo ) ;
807806 $ ( this . wrapSelector ( '#vp_gbToFrame' ) ) . val ( toFrame ) ;
807+ $ ( this . wrapSelector ( '#vp_gbResetIndex' ) ) . prop ( 'checked' , resetIndex ) ;
808808
809809 if ( advPageDom != '' ) {
810810 $ ( this . wrapSelector ( '.vp-gb-adv-box' ) ) . html ( advPageDom ) ;
0 commit comments