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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

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 });
};
};