haya-select 1.0.55 → 1.0.56
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 +1 -1
- package/src/select/index.jsx +4 -4
package/package.json
CHANGED
package/src/select/index.jsx
CHANGED
|
@@ -145,9 +145,9 @@ export default memo(shapeComponent(class HayaSelect extends ShapeComponent {
|
|
|
145
145
|
getValues = () => ("values" in this.props) ? this.p.values : this.s.currentOptions.map((currentOption) => currentOption.value)
|
|
146
146
|
getCurrentOptions = () => {
|
|
147
147
|
if ("values" in this.props && typeof this.props.values != "undefined") {
|
|
148
|
-
if (Array.isArray(this.props.options)
|
|
148
|
+
if (Array.isArray(this.props.options)) {
|
|
149
149
|
return this.p.values.map((value) => this.p.options.find((option) => option.value == value))
|
|
150
|
-
} else if (this.s.loadedOptions
|
|
150
|
+
} else if (this.s.loadedOptions) {
|
|
151
151
|
return this.p.values.map((value) => {
|
|
152
152
|
let foundOption = this.s.loadedOptions.find((option) => option.value == value)
|
|
153
153
|
|
|
@@ -164,9 +164,9 @@ export default memo(shapeComponent(class HayaSelect extends ShapeComponent {
|
|
|
164
164
|
|
|
165
165
|
return foundOption
|
|
166
166
|
})
|
|
167
|
-
} else if (this.props.options == "function"
|
|
167
|
+
} else if (typeof this.props.options == "function") {
|
|
168
168
|
this.setCurrentFromGivenValues()
|
|
169
|
-
} else
|
|
169
|
+
} else {
|
|
170
170
|
return this.p.values.map((value) => ({value}))
|
|
171
171
|
}
|
|
172
172
|
}
|