mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Refactor line limit to use grafana/ui component
This commit is contained in:
parent
14e7f70eac
commit
b985631df6
@ -4,7 +4,7 @@ import { css, cx } from 'emotion';
|
|||||||
import { LokiQuery } from '../types';
|
import { LokiQuery } from '../types';
|
||||||
|
|
||||||
// Types
|
// Types
|
||||||
import { InlineFormLabel, RadioButtonGroup } from '@grafana/ui';
|
import { InlineFormLabel, RadioButtonGroup, InlineField, Input } from '@grafana/ui';
|
||||||
|
|
||||||
export interface LokiOptionFieldsProps {
|
export interface LokiOptionFieldsProps {
|
||||||
lineLimitValue: string;
|
lineLimitValue: string;
|
||||||
@ -108,21 +108,22 @@ export function LokiOptionFields(props: LokiOptionFieldsProps) {
|
|||||||
)}
|
)}
|
||||||
aria-label="Line limit field"
|
aria-label="Line limit field"
|
||||||
>
|
>
|
||||||
<InlineFormLabel width={5}>Line limit</InlineFormLabel>
|
<InlineField label="Line limit">
|
||||||
<input
|
<Input
|
||||||
type="number"
|
className="width-4"
|
||||||
className="gf-form-input width-4"
|
placeholder="auto"
|
||||||
placeholder={'auto'}
|
type="number"
|
||||||
min={0}
|
min={0}
|
||||||
onChange={onMaxLinesChange}
|
onChange={onMaxLinesChange}
|
||||||
onKeyDown={onReturnKeyDown}
|
onKeyDown={onReturnKeyDown}
|
||||||
value={lineLimitValue}
|
value={lineLimitValue}
|
||||||
onBlur={() => {
|
onBlur={() => {
|
||||||
if (runOnBlur) {
|
if (runOnBlur) {
|
||||||
onRunQuery();
|
onRunQuery();
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
</InlineField>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user