@dhis2-ui/transfer 8.13.12 → 8.13.14
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/build/cjs/transfer.js +8 -3
- package/build/es/transfer.js +8 -3
- package/package.json +7 -7
package/build/cjs/transfer.js
CHANGED
|
@@ -154,14 +154,19 @@ const Transfer = _ref => {
|
|
|
154
154
|
* because we need to keep the order of `selected`
|
|
155
155
|
*/
|
|
156
156
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
.
|
|
157
|
+
let pickedOptions = []; // Only map if selected is an array
|
|
158
|
+
|
|
159
|
+
if (Array.isArray(selected)) {
|
|
160
|
+
pickedOptions = actualFilterPickedCallback(selected.map(value => options.find(option => value === option.value)) // filter -> in case a selected value has been provided
|
|
161
|
+
// that does not exist as option
|
|
162
|
+
.filter(identity), actualFilterPicked);
|
|
163
|
+
}
|
|
160
164
|
/*
|
|
161
165
|
* Source options highlighting:
|
|
162
166
|
* These are all the highlighted options on the selected side.
|
|
163
167
|
*/
|
|
164
168
|
|
|
169
|
+
|
|
165
170
|
const {
|
|
166
171
|
highlightedOptions: highlightedPickedOptions,
|
|
167
172
|
setHighlightedOptions: setHighlightedPickedOptions,
|
package/build/es/transfer.js
CHANGED
|
@@ -127,14 +127,19 @@ export const Transfer = _ref => {
|
|
|
127
127
|
* because we need to keep the order of `selected`
|
|
128
128
|
*/
|
|
129
129
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
.
|
|
130
|
+
let pickedOptions = []; // Only map if selected is an array
|
|
131
|
+
|
|
132
|
+
if (Array.isArray(selected)) {
|
|
133
|
+
pickedOptions = actualFilterPickedCallback(selected.map(value => options.find(option => value === option.value)) // filter -> in case a selected value has been provided
|
|
134
|
+
// that does not exist as option
|
|
135
|
+
.filter(identity), actualFilterPicked);
|
|
136
|
+
}
|
|
133
137
|
/*
|
|
134
138
|
* Source options highlighting:
|
|
135
139
|
* These are all the highlighted options on the selected side.
|
|
136
140
|
*/
|
|
137
141
|
|
|
142
|
+
|
|
138
143
|
const {
|
|
139
144
|
highlightedOptions: highlightedPickedOptions,
|
|
140
145
|
setHighlightedOptions: setHighlightedPickedOptions,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dhis2-ui/transfer",
|
|
3
|
-
"version": "8.13.
|
|
3
|
+
"version": "8.13.14",
|
|
4
4
|
"description": "UI Transfer",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@dhis2/prop-types": "^3.1.2",
|
|
35
|
-
"@dhis2-ui/button": "8.13.
|
|
36
|
-
"@dhis2-ui/field": "8.13.
|
|
37
|
-
"@dhis2-ui/input": "8.13.
|
|
38
|
-
"@dhis2-ui/intersection-detector": "8.13.
|
|
39
|
-
"@dhis2-ui/loader": "8.13.
|
|
40
|
-
"@dhis2/ui-constants": "8.13.
|
|
35
|
+
"@dhis2-ui/button": "8.13.14",
|
|
36
|
+
"@dhis2-ui/field": "8.13.14",
|
|
37
|
+
"@dhis2-ui/input": "8.13.14",
|
|
38
|
+
"@dhis2-ui/intersection-detector": "8.13.14",
|
|
39
|
+
"@dhis2-ui/loader": "8.13.14",
|
|
40
|
+
"@dhis2/ui-constants": "8.13.14",
|
|
41
41
|
"classnames": "^2.3.1",
|
|
42
42
|
"prop-types": "^15.7.2"
|
|
43
43
|
},
|