mirror of
https://github.com/grafana/grafana.git
synced 2024-12-01 21:19:28 -06:00
Variables: Page refreshes hitting enter to select a variable value (#70996)
This commit is contained in:
parent
d5309710cb
commit
699e499cc7
@ -43,6 +43,10 @@ class SubMenuUnConnected extends PureComponent<Props> {
|
||||
this.forceUpdate();
|
||||
};
|
||||
|
||||
disableSubmitOnEnter = (e: React.FormEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
};
|
||||
|
||||
render() {
|
||||
const { dashboard, variables, links, annotations, theme } = this.props;
|
||||
|
||||
@ -56,7 +60,7 @@ class SubMenuUnConnected extends PureComponent<Props> {
|
||||
|
||||
return (
|
||||
<div className={styles.submenu}>
|
||||
<form aria-label="Template variables" className={styles.formStyles}>
|
||||
<form aria-label="Template variables" className={styles.formStyles} onSubmit={this.disableSubmitOnEnter}>
|
||||
<SubMenuItems variables={variables} readOnly={readOnlyVariables} />
|
||||
</form>
|
||||
<Annotations
|
||||
|
Loading…
Reference in New Issue
Block a user