mirror of
https://github.com/apache/superset.git
synced 2026-04-28 04:25:07 +00:00
fix: Dataset search when creating a chart (#19065)
This commit is contained in:
committed by
GitHub
parent
c143b37128
commit
fd154f7ba6
@@ -253,9 +253,11 @@ export default class AddSliceContainer extends React.PureComponent<
|
|||||||
}).then((response: JsonResponse) => {
|
}).then((response: JsonResponse) => {
|
||||||
const list: {
|
const list: {
|
||||||
customLabel: ReactNode;
|
customLabel: ReactNode;
|
||||||
|
id: number;
|
||||||
label: string;
|
label: string;
|
||||||
value: string;
|
value: string;
|
||||||
}[] = response.json.result.map((item: Dataset) => ({
|
}[] = response.json.result.map((item: Dataset) => ({
|
||||||
|
id: item.id,
|
||||||
value: `${item.id}__${item.datasource_type}`,
|
value: `${item.id}__${item.datasource_type}`,
|
||||||
customLabel: this.newLabel(item),
|
customLabel: this.newLabel(item),
|
||||||
label: item.table_name,
|
label: item.table_name,
|
||||||
@@ -284,6 +286,7 @@ export default class AddSliceContainer extends React.PureComponent<
|
|||||||
name="select-datasource"
|
name="select-datasource"
|
||||||
onChange={this.changeDatasource}
|
onChange={this.changeDatasource}
|
||||||
options={this.loadDatasources}
|
options={this.loadDatasources}
|
||||||
|
optionFilterProps={['id', 'label']}
|
||||||
placeholder={t('Choose a dataset')}
|
placeholder={t('Choose a dataset')}
|
||||||
showSearch
|
showSearch
|
||||||
value={this.state.datasource}
|
value={this.state.datasource}
|
||||||
|
|||||||
Reference in New Issue
Block a user