From 1b82595251023ab80490d99811d5f81e4b7290e1 Mon Sep 17 00:00:00 2001 From: kay delaney <45561153+kaydelaney@users.noreply.github.com> Date: Tue, 1 Oct 2024 16:02:26 +0100 Subject: [PATCH] UI/AutoSizeInput: Fixes issue where controlledValue being null caused crash (#94078) --- packages/grafana-ui/src/components/Input/AutoSizeInput.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/grafana-ui/src/components/Input/AutoSizeInput.tsx b/packages/grafana-ui/src/components/Input/AutoSizeInput.tsx index 6e5b4ccd837..de855ff5302 100644 --- a/packages/grafana-ui/src/components/Input/AutoSizeInput.tsx +++ b/packages/grafana-ui/src/components/Input/AutoSizeInput.tsx @@ -32,7 +32,7 @@ export const AutoSizeInput = React.forwardRef((props, r // Update internal state when controlled `value` prop changes useEffect(() => { - if (controlledValue !== undefined) { + if (controlledValue) { setValue(controlledValue); } }, [controlledValue]);