From c7803fed199a99292a21ab8b3d76a4d6d0ebf5ec Mon Sep 17 00:00:00 2001 From: David Lechner Date: Tue, 26 Jan 2021 15:37:58 -0600 Subject: [PATCH] fix wrong event type on switch Fixes: index.js:1 Warning: Failed prop type: You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`. --- src/components/SettingsDrawer.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/SettingsDrawer.tsx b/src/components/SettingsDrawer.tsx index b24da192..52dbdde7 100644 --- a/src/components/SettingsDrawer.tsx +++ b/src/components/SettingsDrawer.tsx @@ -211,7 +211,9 @@ class SettingsDrawer extends React.PureComponent { pseudolocalize(!i18n.pseudolocalize)} + onChange={() => + pseudolocalize(!i18n.pseudolocalize) + } label="Pseudolocalize" />