@widergy/mobile-ui 1.43.0 → 1.44.0
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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [1.44.0](https://github.com/widergy/mobile-ui/compare/v1.43.0...v1.44.0) (2025-05-05)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* add simple selection ([#428](https://github.com/widergy/mobile-ui/issues/428)) ([10989ce](https://github.com/widergy/mobile-ui/commit/10989ce4886192674688bae7877ae15dab77b4ec))
|
|
7
|
+
|
|
1
8
|
# [1.43.0](https://github.com/widergy/mobile-ui/compare/v1.42.0...v1.43.0) (2025-05-05)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -25,11 +25,13 @@ class CheckList extends PureComponent {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
handleChange = receivedValue => () => {
|
|
28
|
-
const { input } = this.props;
|
|
28
|
+
const { input, isSimpleSelection } = this.props;
|
|
29
29
|
const { onChange, value } = input;
|
|
30
30
|
|
|
31
31
|
const newValues = !value?.find?.(elem => elem === receivedValue)
|
|
32
|
-
?
|
|
32
|
+
? isSimpleSelection
|
|
33
|
+
? [receivedValue]
|
|
34
|
+
: [...(value || []), receivedValue]
|
|
33
35
|
: value?.filter(elem => elem !== receivedValue);
|
|
34
36
|
if (onChange) onChange(isEmpty(newValues) ? [] : newValues);
|
|
35
37
|
};
|
package/package.json
CHANGED