This commit is contained in:
Gareth Dawson
2023-11-17 11:38:51 +00:00
parent 17d71f6d9e
commit 6b52a475e3

View File

@@ -151,7 +151,7 @@ export const ConfigEditor = (props: Props) => {
width={40} width={40}
placeholder="Password" placeholder="Password"
isConfigured={options.secureJsonFields && options.secureJsonFields.password} isConfigured={options.secureJsonFields && options.secureJsonFields.password}
onReset={() => resetSecureJsonField('password', options, onOptionsChange)} onReset={resetSecureJsonField('password', options, onOptionsChange)}
onBlur={secureJsonDataChangeHandler('password', options, onOptionsChange)} onBlur={secureJsonDataChangeHandler('password', options, onOptionsChange)}
/> />
</Field> </Field>
@@ -465,7 +465,7 @@ const resetSecureJsonField =
value: DataSourceSettings<ZabbixDSOptions, ZabbixSecureJSONData>, value: DataSourceSettings<ZabbixDSOptions, ZabbixSecureJSONData>,
onChange: Props['onOptionsChange'] onChange: Props['onOptionsChange']
) => ) =>
(event: React.SyntheticEvent<HTMLButtonElement>) => { () => {
onChange({ onChange({
...value, ...value,
secureJsonFields: { secureJsonFields: {