diff --git a/public/app/features/explore/Explore.tsx b/public/app/features/explore/Explore.tsx index e171a84d7fd..5a496ea910b 100644 --- a/public/app/features/explore/Explore.tsx +++ b/public/app/features/explore/Explore.tsx @@ -523,6 +523,7 @@ export class Explore extends React.PureComponent { const logsButtonActive = showingLogs ? 'active' : ''; const tableButtonActive = showingBoth || showingTable ? 'active' : ''; const exploreClass = split ? 'explore explore-split' : 'explore'; + const selectedDatasource = datasource ? exploreDatasources.find(d => d.label === datasource.name) : undefined; return (
@@ -555,8 +556,7 @@ export class Explore extends React.PureComponent { placeholder="Select datasource" loadingMessage={() => 'Loading datasources...'} noOptionsMessage={() => 'No datasources found'} - getOptionValue={i => i.value} - getOptionLabel={i => i.label} + value={selectedDatasource} components={{ Option: PickerOption, IndicatorsContainer,