File tree 3 files changed +6
-5
lines changed
3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ const ControlSteps = () => {
13
13
< Steps
14
14
current = { current }
15
15
onChange = { ( val ) => {
16
+ console . log ( 'Change:' , val ) ;
16
17
setCurrent ( val ) ;
17
18
} }
18
19
>
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " rc-steps" ,
3
- "version" : " 3.4.0 " ,
3
+ "version" : " 3.4.1 " ,
4
4
"description" : " steps ui component for react" ,
5
5
"keywords" : [
6
6
" react" ,
Original file line number Diff line number Diff line change @@ -68,10 +68,10 @@ export default class Steps extends Component {
68
68
}
69
69
}
70
70
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 ) ;
75
75
}
76
76
} ;
77
77
You can’t perform that action at this time.
0 commit comments