mirror of
https://github.com/apache/superset.git
synced 2026-04-24 10:35:01 +00:00
Save Dataset Modal: (#20691)
- Stop clearing the selected dataset after overwritting so users can overwrite as many times as they see fit - There's a new AsyncSelect we should use now
This commit is contained in:
committed by
GitHub
parent
2a705406e1
commit
5510af36cc
@@ -19,7 +19,7 @@
|
||||
|
||||
import React, { FunctionComponent, useCallback, useState } from 'react';
|
||||
import { Radio } from 'src/components/Radio';
|
||||
import { RadioChangeEvent, Select } from 'src/components';
|
||||
import { RadioChangeEvent, AsyncSelect } from 'src/components';
|
||||
import { Input } from 'src/components/Input';
|
||||
import StyledModal from 'src/components/Modal';
|
||||
import Button from 'src/components/Button';
|
||||
@@ -158,7 +158,7 @@ export const SaveDatasetModal: FunctionComponent<SaveDatasetModalProps> = ({
|
||||
is_dttm: d.is_dttm,
|
||||
}),
|
||||
),
|
||||
datasetToOverwrite.owners.map((o: DatasetOwner) => o.id),
|
||||
datasetToOverwrite.owners?.map((o: DatasetOwner) => o.id),
|
||||
true,
|
||||
),
|
||||
postFormData(datasetToOverwrite.datasetid, 'table', {
|
||||
@@ -178,7 +178,6 @@ export const SaveDatasetModal: FunctionComponent<SaveDatasetModalProps> = ({
|
||||
window.open(url, '_blank', 'noreferrer');
|
||||
|
||||
setShouldOverwriteDataset(false);
|
||||
setDatasetToOverwrite({});
|
||||
setDatasetName(getDefaultDatasetName());
|
||||
};
|
||||
|
||||
@@ -359,7 +358,7 @@ export const SaveDatasetModal: FunctionComponent<SaveDatasetModalProps> = ({
|
||||
{t('Overwrite existing')}
|
||||
</Radio>
|
||||
<div className="sdm-autocomplete">
|
||||
<Select
|
||||
<AsyncSelect
|
||||
allowClear
|
||||
showSearch
|
||||
placeholder={t('Select or type dataset name')}
|
||||
|
||||
Reference in New Issue
Block a user