File tree 2 files changed +11
-1
lines changed
2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -3,4 +3,11 @@ Changelog
3
3
4
4
in development
5
5
--------------
6
- * Create a changelog and required machinery
6
+
7
+ Added
8
+ ~~~~~
9
+
10
+ * Added feature for disabling button for synchronous responses
11
+ - Button gets disabled onClick on `Connect ` and `Submit ` in st2-login and st2-history module respectively
12
+
13
+ Contributed by @ParthS007
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ export default class HistoryPopup extends React.Component {
39
39
40
40
state = {
41
41
preview : false ,
42
+ disabled : false ,
42
43
}
43
44
44
45
static getDerivedStateFromProps ( props , state ) {
@@ -89,6 +90,7 @@ export default class HistoryPopup extends React.Component {
89
90
delete this . state . payload [ payLoadKey ] ;
90
91
}
91
92
this . props . onSubmit ( this . state . payload ) ;
93
+ this . setState ( { disabled : true } ) ;
92
94
}
93
95
94
96
render ( ) {
@@ -136,6 +138,7 @@ export default class HistoryPopup extends React.Component {
136
138
submit
137
139
className = "st2-details__toolbar-button"
138
140
value = "Submit"
141
+ disabled = { this . state . disabled }
139
142
onClick = { ( e ) => this . handleSubmit ( e ) }
140
143
data-test = "rerun_submit"
141
144
/>
You can’t perform that action at this time.
0 commit comments