You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As you can see in previous example. We are using onChange event. The main reason for that is that LocaleProvider is a [controlled](https://facebook.github.io/react/docs/forms.html#why-controlled-components) component. That means if you wanted to change property named locale of the LocaleProvider you need to change it directly in the render function.
496
+
497
+
If you want to use LocaleProvider as uncontrolled component you can do that. But all properties of the LocaleProvider will be used only as initialisation properties. Here is a second example (please take a loon on the property named controlled of the LocaleProvider).
The main difference is that you are not able to change locale of the LocaleProvider with property named locale after first render.
556
+
471
557
#### Properties of the LocaleSwitch
472
558
473
559
-**onChange** (function): Callback witch a new locale
@@ -528,6 +614,7 @@ The result will be
528
614
-**combinations** (Boolean): You can turn on/off combinations. (Default true)
529
615
-**defaultValue** (Function): What you will see for missing translations (Default (path, attrs) => `Missing default translation for: ${path}`)
530
616
-**filters** (Object): Object with custom filters
617
+
-**controlled** (Boolean): You can set component as uncontrolled (default true). More [information](https://facebook.github.io/react/docs/forms.html#why-controlled-components).
0 commit comments