Skip to content

Commit

Permalink
adding types
Browse files Browse the repository at this point in the history
  • Loading branch information
fisjac committed Nov 22, 2024
1 parent 3478139 commit 84e8a90
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ const DatasourceModal: FunctionComponent<DatasourceModalProps> = ({
endpoint: `/api/v1/dataset/${currentDatasource.id}`,
jsonPayload: buildPayload({
...currentDatasource,
columns: syncedDatasource.columns,
columns: syncedDatasource?.columns,
}),
});
}
Expand Down
6 changes: 5 additions & 1 deletion superset-frontend/src/explore/actions/exploreActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import {
import { Slice } from 'src/types/Chart';
import { SaveActionType } from 'src/explore/types';
import { updateColumns } from 'src/components/Datasource/utils';
import { ExplorePageState } from '../types';

export const UPDATE_FORM_DATA_BY_DATASOURCE = 'UPDATE_FORM_DATA_BY_DATASOURCE';
export function updateFormDataByDatasource(
Expand Down Expand Up @@ -183,7 +184,10 @@ export function stopMetaDataLoading() {

export const SYNC_DATASOURCE_METADATA = 'SYNC_DATASOURCE_METADATA';
export function syncDatasourceMetadata() {
return async function (dispatch: Dispatch, getState) {
return async function (
dispatch: Dispatch,
getState: () => ExplorePageState,
): Promise<any> {
const {
explore: { datasource },
} = getState();
Expand Down

0 comments on commit 84e8a90

Please sign in to comment.