grafana/public/app/plugins/datasource/tempo/QueryField.tsx
Zoltán Bedi 76d02048fa
TraceViewer: Fix lazy loading (#30700)
* Trace: Fix lazy loading

* Add e2e test for trace view lazy load scrolling

* Remove sensitive information

* Update e2e/suite1/specs/trace-view-scrolling.ts

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>

* Address review comments

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-02-02 10:17:38 +01:00

36 lines
1.0 KiB
TypeScript

import { ExploreQueryFieldProps } from '@grafana/data';
import { selectors } from '@grafana/e2e-selectors';
import { LegacyForms } from '@grafana/ui';
import React from 'react';
import { TempoDatasource, TempoQuery } from './datasource';
type Props = ExploreQueryFieldProps<TempoDatasource, TempoQuery>;
export class TempoQueryField extends React.PureComponent<Props> {
render() {
const { query, onChange } = this.props;
return (
<LegacyForms.FormField
label="Trace ID"
labelWidth={4}
inputEl={
<div className="slate-query-field__wrapper">
<div className="slate-query-field" aria-label={selectors.components.QueryField.container}>
<input
style={{ width: '100%' }}
value={query.query || ''}
onChange={(e) =>
onChange({
...query,
query: e.currentTarget.value,
})
}
/>
</div>
</div>
}
/>
);
}
}