infinity-forge 0.16.3 → 0.16.5
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.
|
@@ -60,7 +60,7 @@ function Select(props) {
|
|
|
60
60
|
})
|
|
61
61
|
: fieldValue === null || fieldValue === void 0 ? void 0 : fieldValue.map(function (valueForm) { return props.options.find(function (option) { return option.value === valueForm; }); })
|
|
62
62
|
: [props.options.find(function (option) { return option.value === fieldValue; })];
|
|
63
|
-
console.log(value);
|
|
63
|
+
console.log(value[0]);
|
|
64
64
|
return ((0, jsx_runtime_1.jsx)(S.SelectWrapper, { children: (0, jsx_runtime_1.jsx)(ui_1.InputControl, __assign({}, props, { children: (0, jsx_runtime_1.jsx)(react_select_1.default, { isSearchable: props.isSearchable, menuPlacement: props.menuPlacement || 'auto', menuIsOpen: props.forceOpenToDevelop ? props.forceOpenToDevelop : undefined, placeholder: props.placeholder, name: field.name, noOptionsMessage: function () { return props.noOptionMessage || 'Nenhuma opção encontrada.'; }, onChange: function (ev) {
|
|
65
65
|
var value = props.onlyOneValue
|
|
66
66
|
? ev.value
|
|
@@ -71,7 +71,7 @@ function Select(props) {
|
|
|
71
71
|
: [];
|
|
72
72
|
helpers.setValue(value);
|
|
73
73
|
props.onChangeSelect && props.onChangeSelect(value);
|
|
74
|
-
}, value: value, isMulti: props.isMultiple, options: props.options, components: props.CustomOption
|
|
74
|
+
}, value: props.isMultiple ? value : value[0], isMulti: props.isMultiple, options: props.options, components: props.CustomOption
|
|
75
75
|
? { Option: props.CustomOption, SingleValue: props.CustomOption }
|
|
76
76
|
: undefined, className: ((_a = field === null || field === void 0 ? void 0 : field.value) === null || _a === void 0 ? void 0 : _a.length) > 0 ? 'open' : '' }) })) }));
|
|
77
77
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ui/components/form/select/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;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