@zohodesk/components 1.0.0-temp-199.12 → 1.0.0-temp-220
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/.cli/propValidation_report.html +1 -1
- package/README.md +5 -0
- package/es/ListItem/ListContainer.js +2 -3
- package/es/ListItem/ListItem.js +2 -3
- package/es/ListItem/ListItem.module.css +2 -11
- package/es/ListItem/ListItemWithAvatar.js +3 -3
- package/es/ListItem/ListItemWithIcon.js +2 -3
- package/es/ListItem/props/defaultProps.js +1 -2
- package/es/ListItem/props/propTypes.js +1 -2
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +14 -11
- package/es/MultiSelect/AdvancedMultiSelect.js +12 -6
- package/es/MultiSelect/MultiSelect.js +12 -11
- package/es/MultiSelect/MultiSelectWithAvatar.js +4 -2
- package/es/MultiSelect/Suggestions.js +2 -9
- package/es/MultiSelect/__tests__/AdvancedMultiSelect.spec.js +28 -0
- package/es/MultiSelect/__tests__/__snapshots__/AdvancedMultiSelect.spec.js.snap +390 -0
- package/es/MultiSelect/props/defaultProps.js +8 -7
- package/es/MultiSelect/props/propTypes.js +5 -11
- package/es/Popup/Popup.js +19 -22
- package/es/Select/GroupSelect.js +5 -7
- package/es/Select/Select.js +3 -1
- package/es/Select/SelectWithAvatar.js +6 -9
- package/es/Select/SelectWithIcon.js +2 -4
- package/es/Select/props/defaultProps.js +5 -4
- package/es/Select/props/propTypes.js +7 -10
- package/es/common/common.module.css +0 -5
- package/es/utils/dropDownUtils.js +10 -6
- package/lib/ListItem/ListContainer.js +2 -3
- package/lib/ListItem/ListItem.js +2 -3
- package/lib/ListItem/ListItem.module.css +2 -11
- package/lib/ListItem/ListItemWithAvatar.js +3 -3
- package/lib/ListItem/ListItemWithIcon.js +2 -3
- package/lib/ListItem/props/defaultProps.js +1 -2
- package/lib/ListItem/props/propTypes.js +1 -2
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +14 -13
- package/lib/MultiSelect/AdvancedMultiSelect.js +12 -6
- package/lib/MultiSelect/MultiSelect.js +11 -10
- package/lib/MultiSelect/MultiSelectWithAvatar.js +4 -2
- package/lib/MultiSelect/Suggestions.js +3 -9
- package/lib/MultiSelect/__tests__/AdvancedMultiSelect.spec.js +28 -0
- package/lib/MultiSelect/__tests__/__snapshots__/AdvancedMultiSelect.spec.js.snap +390 -0
- package/lib/MultiSelect/props/defaultProps.js +8 -7
- package/lib/MultiSelect/props/propTypes.js +5 -11
- package/lib/Popup/Popup.js +20 -24
- package/lib/Select/GroupSelect.js +6 -6
- package/lib/Select/Select.js +3 -1
- package/lib/Select/SelectWithAvatar.js +7 -10
- package/lib/Select/SelectWithIcon.js +3 -5
- package/lib/Select/props/defaultProps.js +5 -4
- package/lib/Select/props/propTypes.js +7 -10
- package/lib/common/common.module.css +0 -5
- package/lib/utils/dropDownUtils.js +12 -6
- package/package.json +2 -2
|
@@ -31,8 +31,7 @@ const ListContainer = props => {
|
|
|
31
31
|
onClick,
|
|
32
32
|
onMouseEnter,
|
|
33
33
|
onMouseOver,
|
|
34
|
-
eleRef
|
|
35
|
-
align
|
|
34
|
+
eleRef
|
|
36
35
|
} = props;
|
|
37
36
|
const responsiveFunc = useCallback(_ref => {
|
|
38
37
|
let {
|
|
@@ -78,7 +77,7 @@ const ListContainer = props => {
|
|
|
78
77
|
"aria-selected": ariaSelected,
|
|
79
78
|
"aria-label": ariaLabel,
|
|
80
79
|
isCover: false,
|
|
81
|
-
align:
|
|
80
|
+
align: "vertical",
|
|
82
81
|
alignBox: "row",
|
|
83
82
|
className: `${style.list} ${style[size]} ${mobileToTab && isTouchDevice ? style.responsiveHeight : ''} ${style[palette]} ${active ? style[`active${palette}`] : highlight && !isDisabled ? style[`${palette}Hover`] : ''} ${autoHover && !isDisabled ? style[`${palette}Effect`] : ''} ${needTick ? style[`${size}withTick`] : ''} ${isDisabled ? CssProvider('isDisable') : ''} ${needBorder ? active ? style.activewithBorder : style.withBorder : ''} ${customClass}`,
|
|
84
83
|
dataId: dataId,
|
package/es/ListItem/ListItem.js
CHANGED
|
@@ -100,8 +100,7 @@ export default class ListItem extends React.Component {
|
|
|
100
100
|
autoHover: autoHover,
|
|
101
101
|
needTick: needTick,
|
|
102
102
|
needBorder: needBorder,
|
|
103
|
-
customClass:
|
|
104
|
-
align: needMultiLineText ? 'baseline' : 'vertical',
|
|
103
|
+
customClass: customListItem,
|
|
105
104
|
dataId: dataIdString,
|
|
106
105
|
dataSelectorId: `${dataSelectorId}`,
|
|
107
106
|
isLink: isLink,
|
|
@@ -123,7 +122,7 @@ export default class ListItem extends React.Component {
|
|
|
123
122
|
adjust: true,
|
|
124
123
|
className: style.children
|
|
125
124
|
}, children) : null, needTick && active ? /*#__PURE__*/React.createElement(Box, {
|
|
126
|
-
className: `${style.tickIcon} ${tickIconPalette} ${
|
|
125
|
+
className: `${style.tickIcon} ${tickIconPalette} ${customTickIcon}`,
|
|
127
126
|
"aria-hidden": ariaHidden,
|
|
128
127
|
dataId: `${dataIdString}_tickIcon`,
|
|
129
128
|
dataSelectorId: `${dataSelectorId}_tickIcon`
|
|
@@ -73,7 +73,8 @@
|
|
|
73
73
|
line-height: 1.5385;
|
|
74
74
|
}
|
|
75
75
|
.multiLineValue{
|
|
76
|
-
|
|
76
|
+
word-break: break-word;
|
|
77
|
+
composes: clamp from '../common/common.module.css'
|
|
77
78
|
}
|
|
78
79
|
.iconBox {
|
|
79
80
|
width: var(--zd_size20) ;
|
|
@@ -202,13 +203,3 @@
|
|
|
202
203
|
padding-top: var(--zd_size10) ;
|
|
203
204
|
padding-bottom: var(--zd_size10) ;
|
|
204
205
|
}
|
|
205
|
-
.autoHeight {
|
|
206
|
-
--listitem_height: auto;
|
|
207
|
-
}
|
|
208
|
-
.tickIconCenter {
|
|
209
|
-
top: 50% ;
|
|
210
|
-
transform: translateY(-50%);
|
|
211
|
-
}
|
|
212
|
-
.alignItemBaseline {
|
|
213
|
-
align-self: baseline;
|
|
214
|
-
}
|
|
@@ -107,7 +107,7 @@ export default class ListItemWithAvatar extends React.PureComponent {
|
|
|
107
107
|
autoHover: autoHover,
|
|
108
108
|
needTick: needTick,
|
|
109
109
|
needBorder: needBorder,
|
|
110
|
-
customClass:
|
|
110
|
+
customClass: customListItem,
|
|
111
111
|
dataId: `${dataIdString}_ListItemWithAvatar`,
|
|
112
112
|
dataSelectorId: `${dataSelectorId}`,
|
|
113
113
|
onClick: this.handleClick,
|
|
@@ -118,7 +118,7 @@ export default class ListItemWithAvatar extends React.PureComponent {
|
|
|
118
118
|
customProps: ListItemProps,
|
|
119
119
|
...ContainerProps
|
|
120
120
|
}, name || imgSrc ? /*#__PURE__*/React.createElement(Box, {
|
|
121
|
-
className:
|
|
121
|
+
className: style.leftAvatar
|
|
122
122
|
}, isTeam ? /*#__PURE__*/React.createElement(AvatarTeam, {
|
|
123
123
|
name: name,
|
|
124
124
|
size: "small",
|
|
@@ -147,7 +147,7 @@ export default class ListItemWithAvatar extends React.PureComponent {
|
|
|
147
147
|
"data-title": isDisabled ? null : title,
|
|
148
148
|
className: needMultiLineText ? style.multiLineValue : style.value
|
|
149
149
|
}, value) : null, needTick && active ? /*#__PURE__*/React.createElement(Box, {
|
|
150
|
-
className:
|
|
150
|
+
className: style.tickIcon,
|
|
151
151
|
"aria-hidden": ariaHidden,
|
|
152
152
|
dataId: `${dataIdString}_tickIcon`,
|
|
153
153
|
dataSelectorId: `${dataSelectorId}_tickIcon`
|
|
@@ -95,8 +95,7 @@ export default class ListItemWithIcon extends React.Component {
|
|
|
95
95
|
autoHover: autoHover,
|
|
96
96
|
needTick: needTick,
|
|
97
97
|
needBorder: needBorder,
|
|
98
|
-
customClass:
|
|
99
|
-
align: needMultiLineText && iconClass && !iconName ? 'baseline' : 'vertical',
|
|
98
|
+
customClass: customClass,
|
|
100
99
|
dataId: dataIdString,
|
|
101
100
|
dataSelectorId: dataSelectorId,
|
|
102
101
|
isLink: isLink,
|
|
@@ -126,7 +125,7 @@ export default class ListItemWithIcon extends React.Component {
|
|
|
126
125
|
"data-title": isDisabled ? null : title,
|
|
127
126
|
dataId: `${dataIdString}_Text`
|
|
128
127
|
}, value), needTick && active ? /*#__PURE__*/React.createElement(Box, {
|
|
129
|
-
className:
|
|
128
|
+
className: style.tickIcon,
|
|
130
129
|
"aria-hidden": ariaHidden,
|
|
131
130
|
dataId: `${dataIdString}_tickIcon`,
|
|
132
131
|
dataSelectorId: `${dataSelectorId}_tickIcon`
|
|
@@ -12,8 +12,7 @@ export const ListContainerDefaultProps = {
|
|
|
12
12
|
customClass: '',
|
|
13
13
|
customProps: {},
|
|
14
14
|
dataSelectorId: 'listContainer',
|
|
15
|
-
needMultiLineText: false
|
|
16
|
-
align: 'vertical'
|
|
15
|
+
needMultiLineText: false
|
|
17
16
|
};
|
|
18
17
|
export const ListItemDefaultProps = {
|
|
19
18
|
active: false,
|
|
@@ -27,8 +27,7 @@ export const ListContainer_Props = {
|
|
|
27
27
|
}),
|
|
28
28
|
customClass: PropTypes.string,
|
|
29
29
|
customProps: PropTypes.object,
|
|
30
|
-
eleRef: PropTypes.func
|
|
31
|
-
align: PropTypes.string
|
|
30
|
+
eleRef: PropTypes.func
|
|
32
31
|
};
|
|
33
32
|
export const ListItem_Props = {
|
|
34
33
|
active: PropTypes.bool,
|
|
@@ -121,12 +121,14 @@ class AdvancedGroupMultiSelect extends React.Component {
|
|
|
121
121
|
handleFormatSelectedOptions(selectedOptionDetails, props) {
|
|
122
122
|
let {
|
|
123
123
|
valueField,
|
|
124
|
-
textField
|
|
124
|
+
textField,
|
|
125
|
+
allowValueFallback
|
|
125
126
|
} = props;
|
|
126
127
|
return this.formatSelectedOptions({
|
|
127
128
|
options: selectedOptionDetails,
|
|
128
129
|
valueField,
|
|
129
|
-
textField
|
|
130
|
+
textField,
|
|
131
|
+
allowValueFallback
|
|
130
132
|
});
|
|
131
133
|
}
|
|
132
134
|
|
|
@@ -182,6 +184,9 @@ class AdvancedGroupMultiSelect extends React.Component {
|
|
|
182
184
|
}
|
|
183
185
|
|
|
184
186
|
handleSelectedOptionIdChange(selectedGroupOptions, normalizedFormatOptions, normalizedSelectedOptions) {
|
|
187
|
+
const {
|
|
188
|
+
allowValueFallback
|
|
189
|
+
} = this.props;
|
|
185
190
|
let newSelectedOptions = selectedGroupOptions.map(option => optionIdGrouping(option.id, option.groupId));
|
|
186
191
|
let selectedOptionsLength = newSelectedOptions.length;
|
|
187
192
|
let formatOptions = this.objectConcat({
|
|
@@ -191,7 +196,8 @@ class AdvancedGroupMultiSelect extends React.Component {
|
|
|
191
196
|
return this.getSelectedOptions({
|
|
192
197
|
selectedOptions: newSelectedOptions,
|
|
193
198
|
normalizedFormatOptions: formatOptions,
|
|
194
|
-
selectedOptionsLength
|
|
199
|
+
selectedOptionsLength,
|
|
200
|
+
allowValueFallback
|
|
195
201
|
});
|
|
196
202
|
}
|
|
197
203
|
|
|
@@ -238,10 +244,12 @@ class AdvancedGroupMultiSelect extends React.Component {
|
|
|
238
244
|
|
|
239
245
|
handleGetGroupSelectOptions(props) {
|
|
240
246
|
let {
|
|
247
|
+
allowValueFallback,
|
|
241
248
|
groupedOptions = []
|
|
242
249
|
} = props;
|
|
243
250
|
return this.getGroupSelectOptions({
|
|
244
|
-
groupedOptions
|
|
251
|
+
groupedOptions,
|
|
252
|
+
allowValueFallback
|
|
245
253
|
});
|
|
246
254
|
}
|
|
247
255
|
|
|
@@ -876,12 +884,8 @@ class AdvancedGroupMultiSelect extends React.Component {
|
|
|
876
884
|
needEffect,
|
|
877
885
|
autoComplete,
|
|
878
886
|
getTargetRef,
|
|
879
|
-
isFocus
|
|
880
|
-
customProps
|
|
887
|
+
isFocus
|
|
881
888
|
} = this.props;
|
|
882
|
-
const {
|
|
883
|
-
SuggestionsProps = {}
|
|
884
|
-
} = customProps;
|
|
885
889
|
let {
|
|
886
890
|
clearText = 'Clear all'
|
|
887
891
|
} = i18nKeys;
|
|
@@ -1061,8 +1065,7 @@ class AdvancedGroupMultiSelect extends React.Component {
|
|
|
1061
1065
|
a11y: {
|
|
1062
1066
|
role: 'option'
|
|
1063
1067
|
},
|
|
1064
|
-
dataId: `${dataId}_Options
|
|
1065
|
-
...SuggestionsProps
|
|
1068
|
+
dataId: `${dataId}_Options`
|
|
1066
1069
|
}));
|
|
1067
1070
|
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
1068
1071
|
options: revampedGroups,
|
|
@@ -146,7 +146,8 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
|
|
|
146
146
|
iconSize,
|
|
147
147
|
prefixText,
|
|
148
148
|
optionType,
|
|
149
|
-
disabledOptions
|
|
149
|
+
disabledOptions,
|
|
150
|
+
allowValueFallback
|
|
150
151
|
} = props;
|
|
151
152
|
return this.formatOptions({
|
|
152
153
|
options,
|
|
@@ -157,7 +158,8 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
|
|
|
157
158
|
prefixText,
|
|
158
159
|
optionType,
|
|
159
160
|
iconSize,
|
|
160
|
-
disabledOptions
|
|
161
|
+
disabledOptions,
|
|
162
|
+
allowValueFallback
|
|
161
163
|
});
|
|
162
164
|
}
|
|
163
165
|
|
|
@@ -168,7 +170,8 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
|
|
|
168
170
|
} = this.state || {};
|
|
169
171
|
const {
|
|
170
172
|
selectedOptionsLimit,
|
|
171
|
-
selectedOptionDetails
|
|
173
|
+
selectedOptionDetails,
|
|
174
|
+
allowValueFallback
|
|
172
175
|
} = props;
|
|
173
176
|
showedSelectedOptionsCount = getIsEmptyValue(showedSelectedOptionsCount) ? selectedOptionsLimit : showedSelectedOptionsCount;
|
|
174
177
|
const {
|
|
@@ -181,7 +184,8 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
|
|
|
181
184
|
return this.getSelectedOptions({
|
|
182
185
|
selectedOptions,
|
|
183
186
|
normalizedFormatOptions: formatOptions,
|
|
184
|
-
selectedOptionsLength: showedSelectedOptionsCount
|
|
187
|
+
selectedOptionsLength: showedSelectedOptionsCount,
|
|
188
|
+
allowValueFallback: allowValueFallback
|
|
185
189
|
});
|
|
186
190
|
}
|
|
187
191
|
|
|
@@ -193,7 +197,8 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
|
|
|
193
197
|
optionType,
|
|
194
198
|
iconName,
|
|
195
199
|
iconSize,
|
|
196
|
-
disabledOptions
|
|
200
|
+
disabledOptions,
|
|
201
|
+
allowValueFallback
|
|
197
202
|
} = props;
|
|
198
203
|
return this.formatSelectedOptions({
|
|
199
204
|
options: selectedOptionDetails,
|
|
@@ -203,7 +208,8 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
|
|
|
203
208
|
optionType,
|
|
204
209
|
iconName,
|
|
205
210
|
iconSize,
|
|
206
|
-
disabledOptions
|
|
211
|
+
disabledOptions,
|
|
212
|
+
allowValueFallback
|
|
207
213
|
});
|
|
208
214
|
}
|
|
209
215
|
|
|
@@ -216,7 +216,8 @@ export class MultiSelectComponent extends React.Component {
|
|
|
216
216
|
valueField,
|
|
217
217
|
textField,
|
|
218
218
|
prefixText,
|
|
219
|
-
disabledOptions
|
|
219
|
+
disabledOptions,
|
|
220
|
+
allowValueFallback
|
|
220
221
|
} = props;
|
|
221
222
|
return this.formatOptions({
|
|
222
223
|
options,
|
|
@@ -224,14 +225,19 @@ export class MultiSelectComponent extends React.Component {
|
|
|
224
225
|
textField,
|
|
225
226
|
prefixText,
|
|
226
227
|
optionType: 'default',
|
|
227
|
-
disabledOptions
|
|
228
|
+
disabledOptions,
|
|
229
|
+
allowValueFallback
|
|
228
230
|
});
|
|
229
231
|
}
|
|
230
232
|
|
|
231
|
-
handleGetSelectedOptions(selectedOptions, normalizedFormatOptions) {
|
|
233
|
+
handleGetSelectedOptions(selectedOptions, normalizedFormatOptions, props) {
|
|
234
|
+
const {
|
|
235
|
+
allowValueFallback
|
|
236
|
+
} = props;
|
|
232
237
|
return this.getSelectedOptions({
|
|
233
238
|
selectedOptions,
|
|
234
|
-
normalizedFormatOptions
|
|
239
|
+
normalizedFormatOptions,
|
|
240
|
+
allowValueFallback
|
|
235
241
|
});
|
|
236
242
|
}
|
|
237
243
|
|
|
@@ -1011,12 +1017,8 @@ export class MultiSelectComponent extends React.Component {
|
|
|
1011
1017
|
boxSize,
|
|
1012
1018
|
isLoading,
|
|
1013
1019
|
selectAllText,
|
|
1014
|
-
needSelectAll
|
|
1015
|
-
customProps
|
|
1020
|
+
needSelectAll
|
|
1016
1021
|
} = this.props;
|
|
1017
|
-
const {
|
|
1018
|
-
SuggestionsProps = {}
|
|
1019
|
-
} = customProps;
|
|
1020
1022
|
const {
|
|
1021
1023
|
selectedOptions,
|
|
1022
1024
|
searchStr,
|
|
@@ -1106,8 +1108,7 @@ export class MultiSelectComponent extends React.Component {
|
|
|
1106
1108
|
selectedOptions: selectedOptionIds,
|
|
1107
1109
|
a11y: {
|
|
1108
1110
|
role: 'option'
|
|
1109
|
-
}
|
|
1110
|
-
...SuggestionsProps
|
|
1111
|
+
}
|
|
1111
1112
|
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
1112
1113
|
isLoading: isFetchingOptions,
|
|
1113
1114
|
options: options,
|
|
@@ -41,7 +41,8 @@ class MultiSelectWithAvatarComponent extends MultiSelectComponent {
|
|
|
41
41
|
valueField,
|
|
42
42
|
textField,
|
|
43
43
|
imageField,
|
|
44
|
-
disabledOptions
|
|
44
|
+
disabledOptions,
|
|
45
|
+
allowValueFallback
|
|
45
46
|
} = props;
|
|
46
47
|
return this.formatOptions({
|
|
47
48
|
options,
|
|
@@ -49,7 +50,8 @@ class MultiSelectWithAvatarComponent extends MultiSelectComponent {
|
|
|
49
50
|
textField,
|
|
50
51
|
imageField,
|
|
51
52
|
optionType: 'avatar',
|
|
52
|
-
disabledOptions
|
|
53
|
+
disabledOptions,
|
|
54
|
+
allowValueFallback
|
|
53
55
|
});
|
|
54
56
|
}
|
|
55
57
|
|
|
@@ -27,24 +27,18 @@ export default class Suggestions extends React.PureComponent {
|
|
|
27
27
|
avatarPalette,
|
|
28
28
|
palette,
|
|
29
29
|
htmlId,
|
|
30
|
-
a11y
|
|
31
|
-
customClass,
|
|
32
|
-
needMultiLineText
|
|
30
|
+
a11y
|
|
33
31
|
} = this.props;
|
|
34
32
|
const {
|
|
35
33
|
ariaParentRole,
|
|
36
34
|
ariaMultiselectable
|
|
37
35
|
} = a11y;
|
|
38
|
-
const {
|
|
39
|
-
containerClass = ''
|
|
40
|
-
} = customClass;
|
|
41
36
|
return /*#__PURE__*/React.createElement(Container, {
|
|
42
37
|
isCover: false,
|
|
43
38
|
role: ariaParentRole,
|
|
44
39
|
id: htmlId,
|
|
45
40
|
tabindex: "0",
|
|
46
|
-
"aria-multiselectable": ariaMultiselectable
|
|
47
|
-
className: containerClass
|
|
41
|
+
"aria-multiselectable": ariaMultiselectable
|
|
48
42
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
49
43
|
dataId: `${dataId}`,
|
|
50
44
|
className: className ? className : ''
|
|
@@ -69,7 +63,6 @@ export default class Suggestions extends React.PureComponent {
|
|
|
69
63
|
});
|
|
70
64
|
const commonProps = {
|
|
71
65
|
isDisabled,
|
|
72
|
-
needMultiLineText,
|
|
73
66
|
...listItemCustomProps
|
|
74
67
|
};
|
|
75
68
|
|
|
@@ -9,4 +9,32 @@ describe('AdvancedMultiSelect', () => {
|
|
|
9
9
|
} = render( /*#__PURE__*/React.createElement(AdvancedMultiSelect, null));
|
|
10
10
|
expect(asFragment()).toMatchSnapshot();
|
|
11
11
|
});
|
|
12
|
+
const options = [{
|
|
13
|
+
id: 1,
|
|
14
|
+
text: 'Apple'
|
|
15
|
+
}, {
|
|
16
|
+
id: 2,
|
|
17
|
+
text: 'Orange'
|
|
18
|
+
}, 'string test'];
|
|
19
|
+
test('rendering the options array with objects and string', () => {
|
|
20
|
+
const {
|
|
21
|
+
asFragment
|
|
22
|
+
} = render( /*#__PURE__*/React.createElement(AdvancedMultiSelect, {
|
|
23
|
+
isPopupOpen: true,
|
|
24
|
+
isPopupReady: true,
|
|
25
|
+
options: options
|
|
26
|
+
}));
|
|
27
|
+
expect(asFragment()).toMatchSnapshot();
|
|
28
|
+
});
|
|
29
|
+
test('rendering the options array with only objects using allowValueFallback', () => {
|
|
30
|
+
const {
|
|
31
|
+
asFragment
|
|
32
|
+
} = render( /*#__PURE__*/React.createElement(AdvancedMultiSelect, {
|
|
33
|
+
isPopupOpen: true,
|
|
34
|
+
isPopupReady: true,
|
|
35
|
+
options: options,
|
|
36
|
+
allowValueFallback: false
|
|
37
|
+
}));
|
|
38
|
+
expect(asFragment()).toMatchSnapshot();
|
|
39
|
+
});
|
|
12
40
|
});
|