Skip to content

Commit

Permalink
#OBS-I230: fix: proceed button enabled when data key is emoty
Browse files Browse the repository at this point in the history
  • Loading branch information
JeraldJF committed Oct 4, 2024
1 parent e5124c0 commit c7e9510
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const DataKeySelection = (props: any) => {
})

const pushStateToStore = (values: Record<string, any>) => dispatch(addState({ id, ...values, error: _.keys(formErrors).length > 0 }));
const setStoreToError = () => dispatch(addState({ id, ...existingState || {}, error: existingState ? false : true }));
const setStoreToError = () => dispatch(addState({ id, ...existingState || {}, error: _.get(existingState, "dataKey") ? false : true }));
const onSubmission = (value: any) => { };

useEffect(() => {
Expand Down
5 changes: 3 additions & 2 deletions client/src/services/datasetState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,10 @@ const getJsonSchemaState = async (dataset: Record<string, any>) => {

const getDataKeyState = (dataset: Record<string, any>) => {
const { dataset_config } = dataset;
const dataKey = dataset_config?.keys_config?.data_key || _.get(dataset_config, "data_key")
return {
error: false,
dataKey: dataset_config?.keys_config?.data_key || _.get(dataset_config, "data_key")
error: !dataKey,
dataKey
}
}

Expand Down

0 comments on commit c7e9510

Please sign in to comment.