Fix datasource name getting focused after save while creating new datasource (#1793)

This commit is contained in:
akash-codemonk 2020-11-19 13:04:19 +05:30 committed by GitHub
parent 732dc632cd
commit 32482d4826
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -83,6 +83,14 @@ const datasourcePaneReducer = createReducer(initialState, {
newDatasource: action.payload.id,
};
},
[ReduxActionTypes.SAVE_DATASOURCE_NAME_SUCCESS]: (
state: DatasourcePaneReduxState,
) => {
return {
...state,
newDatasource: "",
};
},
[ReduxActionTypes.UPDATE_DATASOURCE_SUCCESS]: (
state: DatasourcePaneReduxState,
action: ReduxAction<Datasource>,