haya-select 1.0.62 → 1.0.63
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 +5 -1
- package/src/select/option.jsx +1 -1
package/package.json
CHANGED
package/src/select/index.jsx
CHANGED
|
@@ -18,7 +18,11 @@ import useEventListener from "@kaspernj/api-maker/src/use-event-listener"
|
|
|
18
18
|
const nameForComponentWithMultiple = (component) => {
|
|
19
19
|
let name = nameForComponent(component)
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
const currentOptions = component.getCurrentOptions()
|
|
22
|
+
|
|
23
|
+
if (component.props.multiple && name && currentOptions.length > 0) {
|
|
24
|
+
name += "[]"
|
|
25
|
+
}
|
|
22
26
|
|
|
23
27
|
return name
|
|
24
28
|
}
|
package/src/select/option.jsx
CHANGED
|
@@ -9,7 +9,7 @@ export default memo(shapeComponent(class Option extends ShapeComponent {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
static propTypes = {
|
|
12
|
-
currentOptionValues: PropTypes.array
|
|
12
|
+
currentOptionValues: PropTypes.array,
|
|
13
13
|
disabled: PropTypes.bool.isRequired,
|
|
14
14
|
icon: PropTypes.string,
|
|
15
15
|
onOptionClicked: PropTypes.func.isRequired,
|