eschutho commented on code in PR #19855: URL: https://github.com/apache/superset/pull/19855#discussion_r863988958
########## superset-frontend/src/SqlLab/components/SaveDatasetModal/index.tsx: ########## @@ -17,38 +17,43 @@ * under the License. */ -import React, { FunctionComponent } from 'react'; -import { AutoCompleteProps } from 'antd/lib/auto-complete'; +import React, { FunctionComponent, useState } from 'react'; import { Radio } from 'src/components/Radio'; import { AutoComplete, RadioChangeEvent } from 'src/components'; import { Input } from 'src/components/Input'; import StyledModal from 'src/components/Modal'; import Button from 'src/components/Button'; -import { styled, t } from '@superset-ui/core'; +import { + styled, + t, + SupersetClient, + makeApi, + JsonResponse, +} from '@superset-ui/core'; +import moment from 'moment'; +import rison from 'rison'; +import { + DatasetRadioState, + EXPLORE_CHART_DEFAULT, + DatasetOwner, + DatasetOptionAutocomplete, + Query, +} from 'src/SqlLab/types'; +import { DatasourceMeta } from '@superset-ui/chart-controls'; +import { exploreChart } from 'src/explore/exploreUtils'; interface SaveDatasetModalProps { visible: boolean; - onOk: () => void; onHide: () => void; - handleDatasetNameChange: (e: React.FormEvent<HTMLInputElement>) => void; - handleSaveDatasetModalSearch: (searchText: string) => Promise<void>; - filterAutocompleteOption: ( - inputValue: string, - option: { value: string; datasetId: number }, - ) => boolean; - handleSaveDatasetRadioBtnState: (e: RadioChangeEvent) => void; - handleOverwriteCancel: () => void; - handleOverwriteDataset: () => void; - handleOverwriteDatasetOption: ( - data: string, - option: Record<string, any>, - ) => void; - onChangeAutoComplete: () => void; - defaultCreateDatasetValue: string; - disableSaveAndExploreBtn: boolean; - saveDatasetRadioBtnState: number; - shouldOverwriteDataset: boolean; - userDatasetOptions: AutoCompleteProps['options']; + buttonTextOnSave: string; + buttonTextOnOverwrite: string; + modalDescription?: string; + datasource?: DatasourceMeta; + user: { + userId: number; + }; + query?: Query; Review Comment: why an optional query when sql and dbid are required? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org