|
|
@@ -258,6 +258,10 @@ export default class FormWrapper extends Component<PropsType, StateType> {
|
|
|
};
|
|
|
|
|
|
isDisabled = () => {
|
|
|
+ if (this.props.saveValuesStatus == "loading") {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
let requiredMissing = false;
|
|
|
this.state.requiredFields.forEach((requiredKey: string, i: number) => {
|
|
|
if (!this.isSet(this.state.metaState[requiredKey]?.value)) {
|
|
|
@@ -330,7 +334,20 @@ export default class FormWrapper extends Component<PropsType, StateType> {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- // Check if current tab is among non-form tab options{
|
|
|
+ let tabs = this.props.formData?.tabs;
|
|
|
+ if (tabs) {
|
|
|
+ let matchedTab = null as any;
|
|
|
+ tabs.forEach((tab: any, i: number) => {
|
|
|
+ if (tab?.name === this.state.currentTab) {
|
|
|
+ matchedTab = tab;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if (matchedTab) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // Check if current tab is among non-form tab options
|
|
|
let nonFormTabValues = this.props.tabOptions?.map((tab: any, i: number) => {
|
|
|
return tab.value;
|
|
|
});
|
|
|
@@ -358,7 +375,7 @@ export default class FormWrapper extends Component<PropsType, StateType> {
|
|
|
text="Deploy"
|
|
|
onClick={this.handleSubmit}
|
|
|
status={
|
|
|
- this.isDisabled()
|
|
|
+ this.isDisabled() && this.props.saveValuesStatus != "loading"
|
|
|
? "Missing required fields"
|
|
|
: this.props.saveValuesStatus
|
|
|
}
|