You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/06/28 16:02:02 UTC
[GitHub] [superset] diegomedina248 commented on a diff in pull request #20512: fix(sql lab): Save Dataset Modal Autocomplete should display list when overwritting
diegomedina248 commented on code in PR #20512:
URL: https://github.com/apache/superset/pull/20512#discussion_r908661281
##########
superset-frontend/src/SqlLab/components/SaveDatasetModal/index.tsx:
##########
@@ -338,23 +334,27 @@ export const SaveDatasetModal: FunctionComponent<SaveDatasetModalProps> = ({
disabled={newOrOverwrite !== 1}
/>
</Radio>
- <Radio className="sdm-radio" value={2}>
- {t('Overwrite existing')}
- <AutoComplete
- className="sdm-autocomplete"
- options={userDatasetOptions}
- onSelect={handleOverwriteDatasetOption}
- onSearch={handleSaveDatasetModalSearch}
- onChange={value => {
- setDatasetToOverwrite({});
- setAutocompleteValue(value);
- }}
- placeholder={t('Select or type dataset name')}
- filterOption={filterAutocompleteOption}
- disabled={newOrOverwrite !== 2}
- value={autocompleteValue}
- />
- </Radio>
+ <div className="sdm-overwrite-container">
+ <Radio className="sdm-radio" value={2}>
+ {t('Overwrite existing')}
+ </Radio>
+ <div className="sdm-autocomplete">
+ <Select
+ allowClear
+ showSearch
+ placeholder={t('Select or type dataset name')}
+ ariaLabel={t('Existing dataset')}
+ onChange={handleOverwriteDatasetOption}
+ options={input => loadDatasetOverwriteOptions(input)}
+ value={selectedDatasetToOverwrite}
+ filterOption={filterAutocompleteOption}
+ disabled={newOrOverwrite !== 2}
+ // @ts-ignore
Review Comment:
Can we add the prop to the Select type definition?
--
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-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org