on update for checkbox and switch (#22656)

* on update for checkbox and switch

* use ? instead
This commit is contained in:
Shavonn Brown 2020-03-10 08:45:08 -04:00 committed by GitHub
parent 7598d3fb43
commit 65370c5443
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,6 +27,14 @@ export const onUpdateDatasourceJsonDataOptionSelect = <J, S, K extends keyof J>(
updateDatasourcePluginJsonDataOption(props, key, selected.value);
};
export const onUpdateDatasourceJsonDataOptionChecked = <J, S, K extends keyof J>(
props: DataSourcePluginOptionsEditorProps<J, S>,
key: K,
val: boolean
) => (event?: React.SyntheticEvent<HTMLInputElement>) => {
updateDatasourcePluginJsonDataOption(props, key, val);
};
export const onUpdateDatasourceSecureJsonDataOptionSelect = <J, S extends {} = KeyValue>(
props: DataSourcePluginOptionsEditorProps<J, S>,
key: string