[v9.3.x] Elasticsearch: Fix toggle-settings are not shown correctly (#61755)

Elasticsearch: Fix toggle-settings are not shown correctly (#61751)

* changed `checked` propery to `value`

* revert changing the prop in the event

(cherry picked from commit dd8f95a201)

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
This commit is contained in:
Grot (@grafanabot)
2023-01-19 12:48:03 +01:00
committed by GitHub
co-authored by Sven Grossmann
parent 0b1547e326
commit 7127d4f3b9
@@ -130,7 +130,7 @@ export const ElasticDetails = ({ value, onChange }: Props) => {
<InlineField label="X-Pack enabled" labelWidth={26}>
<InlineSwitch
id="es_config_xpackEnabled"
checked={value.jsonData.xpack || false}
value={value.jsonData.xpack || false}
onChange={jsonDataSwitchChangeHandler('xpack', value, onChange)}
/>
</InlineField>
@@ -139,7 +139,7 @@ export const ElasticDetails = ({ value, onChange }: Props) => {
<InlineField label="Include Frozen Indices" labelWidth={26}>
<InlineSwitch
id="es_config_frozenIndices"
checked={value.jsonData.includeFrozen ?? false}
value={value.jsonData.includeFrozen ?? false}
onChange={jsonDataSwitchChangeHandler('includeFrozen', value, onChange)}
/>
</InlineField>