From 369aae93a8343fa09b9f28d4248b7d46ee8fde9f Mon Sep 17 00:00:00 2001 From: Matthias Loibl Date: Thu, 11 Mar 2021 14:37:26 +0100 Subject: [PATCH] web/ui: Hitting enter on range input creates a new query (#8581) Signed-off-by: Matthias Loibl --- web/ui/react-app/src/pages/graph/GraphControls.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/ui/react-app/src/pages/graph/GraphControls.tsx b/web/ui/react-app/src/pages/graph/GraphControls.tsx index 281597d7f..19c48ce1f 100644 --- a/web/ui/react-app/src/pages/graph/GraphControls.tsx +++ b/web/ui/react-app/src/pages/graph/GraphControls.tsx @@ -101,6 +101,9 @@ class GraphControls extends Component { defaultValue={formatDuration(this.props.range)} innerRef={this.rangeRef} onBlur={() => this.onChangeRangeInput(this.rangeRef.current!.value)} + onKeyDown={(e: React.KeyboardEvent) => + e.key === 'Enter' && this.onChangeRangeInput(this.rangeRef.current!.value) + } />