@woosmap/ui 4.31.3 → 4.31.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -222,9 +222,10 @@ export default class LanguageSelect extends Component {
|
|
|
222
222
|
constructor(props) {
|
|
223
223
|
super(props);
|
|
224
224
|
const { defaultValue } = props;
|
|
225
|
-
const defaultLanguage =
|
|
225
|
+
const defaultLanguage =
|
|
226
|
+
defaultValue && defaultValue.map((language) => languageOptions.find((item) => item.value === language));
|
|
226
227
|
this.state = {
|
|
227
|
-
languages:
|
|
228
|
+
languages: defaultLanguage,
|
|
228
229
|
};
|
|
229
230
|
}
|
|
230
231
|
|
|
@@ -319,7 +320,7 @@ LanguageSelect.propTypes = {
|
|
|
319
320
|
isMulti: PropTypes.bool,
|
|
320
321
|
placeholder: PropTypes.string,
|
|
321
322
|
value: PropTypes.string,
|
|
322
|
-
defaultValue: PropTypes.oneOf(languageOptions.map((x) => x.value)),
|
|
323
|
+
defaultValue: PropTypes.arrayOf(PropTypes.oneOf(languageOptions.map((x) => x.value))),
|
|
323
324
|
minimumLength: PropTypes.number,
|
|
324
325
|
onChange: PropTypes.func,
|
|
325
326
|
className: PropTypes.string,
|