SQL Datasources: Fix saving of max idle connections and max connection lifetime (#66662)

Add brackets around property name so that it's dynamic
This commit is contained in:
Kyle Cunningham
2023-04-17 18:46:22 +07:00
committed by GitHub
parent 9a4c7ef758
commit 6ffc0c3eda

View File

@@ -35,7 +35,7 @@ export const ConnectionLimits = <T extends SQLConnectionLimits>(props: Props<T>)
// use a shared function to update respective properties
const onJSONDataNumberChanged = (property: keyof SQLConnectionLimits) => {
return (number?: number) => {
updateJsonData({ property: number });
updateJsonData({ [property]: number });
};
};