Fix execute query keyboard focus moves to hidden element under 'Results' section of executed Query 1 blade (#1082)

* fix a11y quertTab results section hidden element focus issue

* Removed commented code

* Resolved lint issues
This commit is contained in:
vaidankarswapnil 2021-09-17 02:51:19 +05:30 committed by GitHub
parent d7997d716e
commit ae9c27795e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
import { DetailsList, DetailsListLayoutMode, IColumn, Pivot, PivotItem, SelectionMode } from "@fluentui/react"; import { DetailsList, DetailsListLayoutMode, IColumn, Pivot, PivotItem, SelectionMode, Text } from "@fluentui/react";
import React, { Fragment } from "react"; import React, { Fragment } from "react";
import SplitterLayout from "react-splitter-layout"; import SplitterLayout from "react-splitter-layout";
import "react-splitter-layout/lib/index.css"; import "react-splitter-layout/lib/index.css";
@ -120,21 +120,13 @@ export default class QueryTabComponent extends React.Component<IQueryTabComponen
constructor(props: IQueryTabComponentProps) { constructor(props: IQueryTabComponentProps) {
super(props); super(props);
const columns: IColumn[] = [ const columns: IColumn[] = [
{
key: "column1",
name: "",
minWidth: 16,
maxWidth: 16,
data: String,
fieldName: "toolTip",
onRender: this.onRenderColumnItem,
},
{ {
key: "column2", key: "column2",
name: "METRIC", name: "METRIC",
minWidth: 200, minWidth: 200,
data: String, data: String,
fieldName: "metric", fieldName: "metric",
onRender: this.onRenderColumnItem,
}, },
{ {
key: "column3", key: "column3",
@ -206,7 +198,12 @@ export default class QueryTabComponent extends React.Component<IQueryTabComponen
public onRenderColumnItem(item: IDocument): JSX.Element { public onRenderColumnItem(item: IDocument): JSX.Element {
if (item.toolTip !== "") { if (item.toolTip !== "") {
return <InfoTooltip>{`${item.toolTip}`}</InfoTooltip>; return (
<>
<InfoTooltip>{`${item.toolTip}`}</InfoTooltip>
<Text style={{ paddingLeft: 10, margin: 0 }}>{`${item.metric}`}</Text>
</>
);
} else { } else {
return undefined; return undefined;
} }