Skip to content

Commit

Permalink
fix: Dataset search when creating a chart (#19065)
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-s-molina committed Mar 9, 2022
1 parent c143b37 commit fd154f7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions superset-frontend/src/addSlice/AddSliceContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,11 @@ export default class AddSliceContainer extends React.PureComponent<
}).then((response: JsonResponse) => {
const list: {
customLabel: ReactNode;
id: number;
label: string;
value: string;
}[] = response.json.result.map((item: Dataset) => ({
id: item.id,
value: `${item.id}__${item.datasource_type}`,
customLabel: this.newLabel(item),
label: item.table_name,
Expand Down Expand Up @@ -284,6 +286,7 @@ export default class AddSliceContainer extends React.PureComponent<
name="select-datasource"
onChange={this.changeDatasource}
options={this.loadDatasources}
optionFilterProps={['id', 'label']}
placeholder={t('Choose a dataset')}
showSearch
value={this.state.datasource}
Expand Down

0 comments on commit fd154f7

Please sign in to comment.