Variables: allow Regex tooltip links to be clickable (#48560)

Fixes #48558
This commit is contained in:
Adam Simpson 2022-05-02 13:44:23 -04:00 committed by GitHub
parent 4867a6b15f
commit 9db95826a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -14,6 +14,7 @@ interface VariableTextFieldProps {
labelWidth?: number;
grow?: boolean;
onBlur?: (event: FormEvent<HTMLInputElement>) => void;
interactive?: boolean;
}
export function VariableTextField({
@ -28,9 +29,10 @@ export function VariableTextField({
onBlur,
tooltip,
grow,
interactive,
}: PropsWithChildren<VariableTextFieldProps>): ReactElement {
return (
<InlineField label={name} labelWidth={labelWidth ?? 12} tooltip={tooltip} grow={grow}>
<InlineField interactive={interactive} label={name} labelWidth={labelWidth ?? 12} tooltip={tooltip} grow={grow}>
<Input
type="text"
id={name}

View File

@ -201,6 +201,7 @@ export class QueryVariableEditorUnConnected extends PureComponent<Props, State>
onChange={this.onRegExChange}
onBlur={this.onRegExBlur}
labelWidth={20}
interactive={true}
tooltip={
<div>
Optional, if you want to extract part of a series name or metric node segment. Named capture groups