mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Fixed new variable button keyboard clickable (#46293)
This commit is contained in:
parent
f19594e8ff
commit
9fc9708ba5
@ -1,21 +1,21 @@
|
|||||||
import React, { MouseEvent, PureComponent } from 'react';
|
|
||||||
import { bindActionCreators } from 'redux';
|
|
||||||
import { connect, ConnectedProps } from 'react-redux';
|
|
||||||
import { Icon, LinkButton } from '@grafana/ui';
|
|
||||||
import { selectors } from '@grafana/e2e-selectors';
|
import { selectors } from '@grafana/e2e-selectors';
|
||||||
|
import { Button, Icon } from '@grafana/ui';
|
||||||
import { KeyedVariableIdentifier } from '../state/types';
|
|
||||||
import { StoreState, ThunkDispatch } from '../../../types';
|
|
||||||
import { VariableEditorEditor } from './VariableEditorEditor';
|
|
||||||
import { getEditorVariables, getVariablesState } from '../state/selectors';
|
|
||||||
import { switchToEditMode, switchToListMode, switchToNewMode } from './actions';
|
|
||||||
import { changeVariableOrder, duplicateVariable, removeVariable } from '../state/sharedReducer';
|
|
||||||
import { VariableEditorList } from './VariableEditorList';
|
|
||||||
import { VariablesUnknownTable } from '../inspect/VariablesUnknownTable';
|
|
||||||
import { VariablesDependenciesButton } from '../inspect/VariablesDependenciesButton';
|
|
||||||
import { DashboardModel } from 'app/features/dashboard/state/DashboardModel';
|
import { DashboardModel } from 'app/features/dashboard/state/DashboardModel';
|
||||||
|
import React, { MouseEvent, PureComponent } from 'react';
|
||||||
|
import { connect, ConnectedProps } from 'react-redux';
|
||||||
|
import { bindActionCreators } from 'redux';
|
||||||
|
|
||||||
|
import { StoreState, ThunkDispatch } from '../../../types';
|
||||||
|
import { VariablesDependenciesButton } from '../inspect/VariablesDependenciesButton';
|
||||||
|
import { VariablesUnknownTable } from '../inspect/VariablesUnknownTable';
|
||||||
import { toKeyedAction } from '../state/keyedVariablesReducer';
|
import { toKeyedAction } from '../state/keyedVariablesReducer';
|
||||||
|
import { getEditorVariables, getVariablesState } from '../state/selectors';
|
||||||
|
import { changeVariableOrder, duplicateVariable, removeVariable } from '../state/sharedReducer';
|
||||||
|
import { KeyedVariableIdentifier } from '../state/types';
|
||||||
import { toKeyedVariableIdentifier, toVariablePayload } from '../utils';
|
import { toKeyedVariableIdentifier, toVariablePayload } from '../utils';
|
||||||
|
import { switchToEditMode, switchToListMode, switchToNewMode } from './actions';
|
||||||
|
import { VariableEditorEditor } from './VariableEditorEditor';
|
||||||
|
import { VariableEditorList } from './VariableEditorList';
|
||||||
|
|
||||||
const mapStateToProps = (state: StoreState, ownProps: OwnProps) => {
|
const mapStateToProps = (state: StoreState, ownProps: OwnProps) => {
|
||||||
const { uid } = ownProps.dashboard;
|
const { uid } = ownProps.dashboard;
|
||||||
@ -116,13 +116,13 @@ class VariableEditorContainerUnconnected extends PureComponent<Props> {
|
|||||||
{this.props.variables.length > 0 && variableToEdit === null && (
|
{this.props.variables.length > 0 && variableToEdit === null && (
|
||||||
<>
|
<>
|
||||||
<VariablesDependenciesButton variables={this.props.variables} />
|
<VariablesDependenciesButton variables={this.props.variables} />
|
||||||
<LinkButton
|
<Button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={this.onNewVariable}
|
onClick={this.onNewVariable}
|
||||||
aria-label={selectors.pages.Dashboard.Settings.Variables.List.newButton}
|
aria-label={selectors.pages.Dashboard.Settings.Variables.List.newButton}
|
||||||
>
|
>
|
||||||
New
|
New
|
||||||
</LinkButton>
|
</Button>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user