X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/b86917ee687fe693a4aee2608c2ceffca660a59e..91805762d03955bc2b34804eecb9c6ee775b2528:/src/views/run-process-panel/run-process-second-step.tsx
diff --git a/src/views/run-process-panel/run-process-second-step.tsx b/src/views/run-process-panel/run-process-second-step.tsx
index 89092c8c..0b856382 100644
--- a/src/views/run-process-panel/run-process-second-step.tsx
+++ b/src/views/run-process-panel/run-process-second-step.tsx
@@ -11,6 +11,8 @@ import { connect } from 'react-redux';
import { RootState } from '~/store/store';
import { isValid } from 'redux-form';
import { RUN_PROCESS_INPUTS_FORM } from './run-process-inputs-form';
+import { RunProcessAdvancedForm } from './run-process-advanced-form';
+import { createSelector, createStructuredSelector } from 'reselect';
export interface RunProcessSecondStepFormDataProps {
inputs: CommandInputParameter[];
@@ -22,10 +24,15 @@ export interface RunProcessSecondStepFormActionProps {
runProcess: () => void;
}
-const mapStateToProps = (state: RootState): RunProcessSecondStepFormDataProps => ({
- inputs: state.runProcessPanel.inputs,
- valid: isValid(RUN_PROCESS_BASIC_FORM)(state.form) &&
- isValid(RUN_PROCESS_INPUTS_FORM)(state.form),
+const inputsSelector = (state: RootState) =>
+ state.runProcessPanel.inputs;
+
+const validSelector = (state: RootState) =>
+ isValid(RUN_PROCESS_BASIC_FORM)(state) && isValid(RUN_PROCESS_INPUTS_FORM)(state);
+
+const mapStateToProps = createStructuredSelector({
+ inputs: inputsSelector,
+ valid: validSelector,
});
export type RunProcessSecondStepFormProps = RunProcessSecondStepFormDataProps & RunProcessSecondStepFormActionProps;
@@ -35,6 +42,7 @@ export const RunProcessSecondStepForm = connect(mapStateToProps)(
+