mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Add/Edit Panel: Enable new DS picker toggle by default (#68380)
* Add Panel: Enable new DS picker and onboarding DS prompt * Add e2e selectors
This commit is contained in:
@@ -5,6 +5,7 @@ import React, { useCallback, useEffect, useRef, useState } from 'react';
|
||||
import { usePopper } from 'react-popper';
|
||||
|
||||
import { DataSourceInstanceSettings, GrafanaTheme2 } from '@grafana/data';
|
||||
import { selectors } from '@grafana/e2e-selectors';
|
||||
import { reportInteraction } from '@grafana/runtime';
|
||||
import { DataSourceJsonData } from '@grafana/schema';
|
||||
import { Button, Icon, Input, ModalsController, Portal, useStyles2 } from '@grafana/ui';
|
||||
@@ -103,12 +104,13 @@ export function DataSourceDropdown(props: DataSourceDropdownProps) {
|
||||
const styles = useStyles2(getStylesDropdown);
|
||||
|
||||
return (
|
||||
<div className={styles.container}>
|
||||
<div className={styles.container} data-testid={selectors.components.DataSourcePicker.container}>
|
||||
{/* This clickable div is just extending the clickable area on the input element to include the prefix and suffix. */}
|
||||
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */}
|
||||
<div className={styles.trigger} onClick={openDropdown}>
|
||||
<Input
|
||||
className={inputHasFocus ? undefined : styles.input}
|
||||
data-testid={selectors.components.DataSourcePicker.inputV2}
|
||||
prefix={
|
||||
filterTerm && isOpen ? (
|
||||
<DataSourceLogoPlaceHolder />
|
||||
|
||||
Reference in New Issue
Block a user