File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ const ControlSteps = () => {
1313 < Steps
1414 current = { current }
1515 onChange = { ( val ) => {
16+ console . log ( 'Change:' , val ) ;
1617 setCurrent ( val ) ;
1718 } }
1819 >
Original file line number Diff line number Diff line change 11{
22 "name" : " rc-steps" ,
3- "version" : " 3.4.0 " ,
3+ "version" : " 3.4.1 " ,
44 "description" : " steps ui component for react" ,
55 "keywords" : [
66 " react" ,
Original file line number Diff line number Diff line change @@ -68,10 +68,10 @@ export default class Steps extends Component {
6868 }
6969 }
7070
71- onStepClick = ( current ) => {
72- const { onChange } = this . props ;
73- if ( onChange ) {
74- onChange ( current ) ;
71+ onStepClick = ( next ) => {
72+ const { onChange, current } = this . props ;
73+ if ( onChange && current !== next ) {
74+ onChange ( next ) ;
7575 }
7676 } ;
7777
You can’t perform that action at this time.
0 commit comments