From 6ffc0c3eda5519f0c9bdd4be18bc6cd2f8c09d97 Mon Sep 17 00:00:00 2001 From: Kyle Cunningham Date: Mon, 17 Apr 2023 18:46:22 +0700 Subject: [PATCH] SQL Datasources: Fix saving of max idle connections and max connection lifetime (#66662) Add brackets around property name so that it's dynamic --- .../plugins/sql/components/configuration/ConnectionLimits.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/features/plugins/sql/components/configuration/ConnectionLimits.tsx b/public/app/features/plugins/sql/components/configuration/ConnectionLimits.tsx index ed7d4cbd0d8..aa732c1ad27 100644 --- a/public/app/features/plugins/sql/components/configuration/ConnectionLimits.tsx +++ b/public/app/features/plugins/sql/components/configuration/ConnectionLimits.tsx @@ -35,7 +35,7 @@ export const ConnectionLimits = (props: Props) // use a shared function to update respective properties const onJSONDataNumberChanged = (property: keyof SQLConnectionLimits) => { return (number?: number) => { - updateJsonData({ property: number }); + updateJsonData({ [property]: number }); }; };