@progress/kendo-react-dropdowns 5.13.0-dev.202304201410 → 5.13.0-dev.202304251043
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/dist/cdn/js/kendo-react-dropdowns.js +1 -1
- package/dist/es/AutoComplete/AutoComplete.js +10 -1
- package/dist/es/ComboBox/ComboBox.js +8 -4
- package/dist/es/DropDownList/DropDownList.js +11 -3
- package/dist/es/MultiColumnComboBox/MultiColumnComboBox.js +28 -8
- package/dist/es/MultiSelect/MultiSelect.d.ts +1 -1
- package/dist/es/MultiSelect/MultiSelect.js +24 -14
- package/dist/es/MultiSelect/MultiSelectProps.d.ts +1 -1
- package/dist/es/common/DropDownBase.d.ts +1 -0
- package/dist/es/common/DropDownBase.js +5 -0
- package/dist/es/common/MultiColumnList.js +0 -2
- package/dist/es/package-metadata.js +1 -1
- package/dist/npm/AutoComplete/AutoComplete.js +10 -1
- package/dist/npm/ComboBox/ComboBox.js +8 -4
- package/dist/npm/DropDownList/DropDownList.js +11 -3
- package/dist/npm/MultiColumnComboBox/MultiColumnComboBox.js +28 -8
- package/dist/npm/MultiSelect/MultiSelect.d.ts +1 -1
- package/dist/npm/MultiSelect/MultiSelect.js +24 -14
- package/dist/npm/MultiSelect/MultiSelectProps.d.ts +1 -1
- package/dist/npm/common/DropDownBase.d.ts +1 -0
- package/dist/npm/common/DropDownBase.js +5 -0
- package/dist/npm/common/MultiColumnList.js +0 -2
- package/dist/npm/package-metadata.js +1 -1
- package/dist/systemjs/kendo-react-dropdowns.js +1 -1
- package/package.json +13 -13
|
@@ -164,6 +164,7 @@ var AutoCompleteWithoutContext = /** @class */ (function (_super) {
|
|
|
164
164
|
}
|
|
165
165
|
state.data.focusedItem = undefined;
|
|
166
166
|
_this.applyState(state);
|
|
167
|
+
_this.setState({ group: undefined });
|
|
167
168
|
};
|
|
168
169
|
_this.clearButtonClick = function (event) {
|
|
169
170
|
var base = _this.base;
|
|
@@ -321,6 +322,14 @@ var AutoCompleteWithoutContext = /** @class */ (function (_super) {
|
|
|
321
322
|
}
|
|
322
323
|
else if (!this._isScrolling) {
|
|
323
324
|
var focusedItemIndex = (_a = this.base.getGroupedDataModernMode(data, groupField)) === null || _a === void 0 ? void 0 : _a.indexOf(focusedItem);
|
|
325
|
+
if (opening) {
|
|
326
|
+
// Resets the sticky header group value for scenarios with open/close of component's popup
|
|
327
|
+
if (data && data.length !== 0) {
|
|
328
|
+
this.base.resetGroupStickyHeader(data[0][groupField], this);
|
|
329
|
+
}
|
|
330
|
+
this.base.scrollToItem(focusedItemIndex);
|
|
331
|
+
}
|
|
332
|
+
;
|
|
324
333
|
if (opened && prevOpened && focusedItemChanged) {
|
|
325
334
|
this.base.scrollToItem(focusedItemIndex);
|
|
326
335
|
}
|
|
@@ -440,7 +449,7 @@ var AutoCompleteWithoutContext = /** @class */ (function (_super) {
|
|
|
440
449
|
React.createElement("div", { className: classNames('k-list', (_a = {},
|
|
441
450
|
_a["k-list-".concat(sizeMap[size] || size)] = size,
|
|
442
451
|
_a)) },
|
|
443
|
-
!list && group && React.createElement(GroupStickyHeader, { group: group, groupMode: 'modern', render: groupStickyHeaderItemRender }),
|
|
452
|
+
!list && group && data.length !== 0 && React.createElement(GroupStickyHeader, { group: group, groupMode: 'modern', render: groupStickyHeaderItemRender }),
|
|
444
453
|
this.renderList()),
|
|
445
454
|
footer && React.createElement("div", { className: "k-list-footer" }, footer)));
|
|
446
455
|
};
|
|
@@ -239,6 +239,7 @@ var ComboBoxWithoutContext = /** @class */ (function (_super) {
|
|
|
239
239
|
}
|
|
240
240
|
_this.base.filterChanged(value, state);
|
|
241
241
|
_this.applyState(state);
|
|
242
|
+
_this.setState({ group: undefined });
|
|
242
243
|
};
|
|
243
244
|
_this.clearButtonClick = function (event) {
|
|
244
245
|
var state = _this.base.initState();
|
|
@@ -384,8 +385,7 @@ var ComboBoxWithoutContext = /** @class */ (function (_super) {
|
|
|
384
385
|
/** @hidden */
|
|
385
386
|
ComboBoxWithoutContext.prototype.componentDidUpdate = function (prevProps, prevState) {
|
|
386
387
|
var _a;
|
|
387
|
-
var _b = this.props, dataItemKey = _b.dataItemKey, virtual = _b.virtual, _c = _b.groupField, groupField = _c === void 0 ? '' : _c;
|
|
388
|
-
var _d = this.props.data, data = _d === void 0 ? [] : _d;
|
|
388
|
+
var _b = this.props, dataItemKey = _b.dataItemKey, virtual = _b.virtual, _c = _b.groupField, groupField = _c === void 0 ? '' : _c, _d = _b.data, data = _d === void 0 ? [] : _d;
|
|
389
389
|
var prevTotal = prevProps.virtual ? prevProps.virtual.total : 0;
|
|
390
390
|
var opened = this.props.opened !== undefined ? this.props.opened : this.state.opened;
|
|
391
391
|
var prevOpened = prevProps.opened !== undefined ? prevProps.opened : prevState.opened;
|
|
@@ -409,6 +409,10 @@ var ComboBoxWithoutContext = /** @class */ (function (_super) {
|
|
|
409
409
|
}
|
|
410
410
|
else if (opening && !virtual) {
|
|
411
411
|
this.onPopupOpened();
|
|
412
|
+
// Resets the sticky header group value for scenarios with open/close of component's popup
|
|
413
|
+
if (data && data.length !== 0) {
|
|
414
|
+
this.base.resetGroupStickyHeader(data[0][groupField], this);
|
|
415
|
+
}
|
|
412
416
|
this.base.scrollToItem(selectedItemIndex);
|
|
413
417
|
}
|
|
414
418
|
else if (opened && prevOpened && selectedItem && selectedItemChanged) {
|
|
@@ -629,7 +633,7 @@ var ComboBoxWithoutContext = /** @class */ (function (_super) {
|
|
|
629
633
|
_a["k-table-".concat(sizeMap[size] || size)] = list && size,
|
|
630
634
|
_a)) },
|
|
631
635
|
header && React.createElement("div", { className: "k-table-header" }, header),
|
|
632
|
-
!list && group && React.createElement(GroupStickyHeader, { group: group, groupMode: groupMode, render: groupStickyHeaderItemRender }),
|
|
636
|
+
!list && group && data.length !== 0 && React.createElement(GroupStickyHeader, { group: group, groupMode: groupMode, render: groupStickyHeaderItemRender }),
|
|
633
637
|
this.renderList(),
|
|
634
638
|
footer && React.createElement("div", { className: "k-list-footer" }, footer)))))));
|
|
635
639
|
};
|
|
@@ -660,7 +664,7 @@ var ComboBoxWithoutContext = /** @class */ (function (_super) {
|
|
|
660
664
|
_a["k-table-".concat(sizeMap[size] || size)] = list && size,
|
|
661
665
|
_a)) },
|
|
662
666
|
header && React.createElement("div", { className: "k-table-header" }, header),
|
|
663
|
-
!list && group && React.createElement(GroupStickyHeader, { group: group, groupMode: groupMode, render: groupStickyHeaderItemRender }),
|
|
667
|
+
!list && group && data.length !== 0 && React.createElement(GroupStickyHeader, { group: group, groupMode: groupMode, render: groupStickyHeaderItemRender }),
|
|
664
668
|
this.renderList(),
|
|
665
669
|
footer && React.createElement("div", { className: "k-list-footer" }, footer))));
|
|
666
670
|
};
|
|
@@ -127,7 +127,7 @@ var DropDownListWithoutContext = /** @class */ (function (_super) {
|
|
|
127
127
|
header && React.createElement("div", { className: "k-list-header" }, header),
|
|
128
128
|
React.createElement("div", { className: classNames('k-list', (_a = {}, _a["k-list-".concat(sizeMap[size] || size)] = size, _a['k-virtual-list'] = _this.base.vs.enabled, _a)) },
|
|
129
129
|
_this.renderDefaultItem(),
|
|
130
|
-
!list && group && React.createElement(GroupStickyHeader, { group: group, groupMode: 'modern', render: groupStickyHeaderItemRender }),
|
|
130
|
+
!list && group && data.length !== 0 && React.createElement(GroupStickyHeader, { group: group, groupMode: 'modern', render: groupStickyHeaderItemRender }),
|
|
131
131
|
_this.renderList()),
|
|
132
132
|
footer && React.createElement("div", { className: "k-list-footer" }, footer)));
|
|
133
133
|
};
|
|
@@ -291,11 +291,14 @@ var DropDownListWithoutContext = /** @class */ (function (_super) {
|
|
|
291
291
|
return;
|
|
292
292
|
}
|
|
293
293
|
var opened = _this.props.opened !== undefined ? _this.props.opened : _this.state.opened;
|
|
294
|
+
var adaptive = _this.props.adaptive;
|
|
295
|
+
var _a = _this.state.windowWidth, windowWidth = _a === void 0 ? 0 : _a;
|
|
296
|
+
var renderAdaptive = windowWidth <= MOBILE_MEDIUM_DEVISE && adaptive;
|
|
294
297
|
var state = _this.base.initState();
|
|
295
298
|
state.syntheticEvent = event;
|
|
296
299
|
state.data.focused = false;
|
|
297
300
|
state.events.push({ type: 'onBlur' });
|
|
298
|
-
if (opened) {
|
|
301
|
+
if (opened && !renderAdaptive) {
|
|
299
302
|
_this.base.togglePopup(state);
|
|
300
303
|
}
|
|
301
304
|
_this.applyState(state);
|
|
@@ -344,6 +347,7 @@ var DropDownListWithoutContext = /** @class */ (function (_super) {
|
|
|
344
347
|
}
|
|
345
348
|
_this.base.filterChanged(event.target.value, state);
|
|
346
349
|
_this.applyState(state);
|
|
350
|
+
_this.setState({ group: undefined });
|
|
347
351
|
};
|
|
348
352
|
_this.onPopupOpened = function () {
|
|
349
353
|
if (_this._filterInput) {
|
|
@@ -522,6 +526,10 @@ var DropDownListWithoutContext = /** @class */ (function (_super) {
|
|
|
522
526
|
}
|
|
523
527
|
else if (opening && !virtual) {
|
|
524
528
|
this.onPopupOpened();
|
|
529
|
+
// Resets the sticky header group value for scenarios with open/close of component's popup
|
|
530
|
+
if (data && data.length !== 0) {
|
|
531
|
+
this.base.resetGroupStickyHeader(data[0][groupField], this);
|
|
532
|
+
}
|
|
525
533
|
this.base.scrollToItem(selectedItemIndex);
|
|
526
534
|
}
|
|
527
535
|
else if (opened && prevOpened && selectedItem_1 && selectedItemChanged && !this._navigated) {
|
|
@@ -666,7 +674,7 @@ var DropDownListWithoutContext = /** @class */ (function (_super) {
|
|
|
666
674
|
header && React.createElement("div", { className: "k-list-header" }, header),
|
|
667
675
|
React.createElement("div", { className: classNames('k-list', (_a = {}, _a["k-list-".concat(sizeMap[size] || size)] = size, _a['k-virtual-list'] = this.base.vs.enabled, _a)) },
|
|
668
676
|
this.renderDefaultItem(),
|
|
669
|
-
!list && group && React.createElement(GroupStickyHeader, { group: group, groupMode: 'modern', render: groupStickyHeaderItemRender }),
|
|
677
|
+
!list && group && data.length !== 0 && React.createElement(GroupStickyHeader, { group: group, groupMode: 'modern', render: groupStickyHeaderItemRender }),
|
|
670
678
|
this.renderList()),
|
|
671
679
|
footer && React.createElement("div", { className: "k-list-footer" }, footer)))));
|
|
672
680
|
};
|
|
@@ -67,15 +67,14 @@ export var MultiColumnComboBox = React.forwardRef(function (directProps, ref) {
|
|
|
67
67
|
});
|
|
68
68
|
React.useImperativeHandle(ref, function () { return target.current; });
|
|
69
69
|
var initialGroupHeader = React.useMemo(function () {
|
|
70
|
-
if (
|
|
70
|
+
if (props.groupField !== undefined && props.data) {
|
|
71
71
|
return getItemValue(props.data[0], props.groupField);
|
|
72
72
|
}
|
|
73
73
|
}, [props.data, props.groupField]);
|
|
74
74
|
var _c = React.useState(initialGroupHeader), groupHeader = _c[0], setGroupHeader = _c[1];
|
|
75
|
+
var _d = React.useState(true), showStickyHeader = _d[0], setShowStickyHeader = _d[1];
|
|
75
76
|
var header = React.useMemo(function () {
|
|
76
|
-
var renderer = (React.createElement("th", { className: 'k-table-th', colSpan: columns.length },
|
|
77
|
-
groupHeader,
|
|
78
|
-
" "));
|
|
77
|
+
var renderer = (React.createElement("th", { className: 'k-table-th', colSpan: columns.length }, groupHeader));
|
|
79
78
|
return (React.createElement(React.Fragment, null,
|
|
80
79
|
props.header,
|
|
81
80
|
React.createElement("div", { className: "k-table-header-wrap" },
|
|
@@ -87,8 +86,8 @@ export var MultiColumnComboBox = React.forwardRef(function (directProps, ref) {
|
|
|
87
86
|
React.createElement("tr", { className: 'k-table-row' }, columns.map(function (column, i) {
|
|
88
87
|
return (React.createElement("th", { className: "k-table-th", key: column.uniqueKey ? column.uniqueKey : i }, column.header || '\u00A0'));
|
|
89
88
|
})),
|
|
90
|
-
groupHeader && React.createElement("tr", { className: 'k-table-group-row' }, props.groupStickyHeaderItemRender ? props.groupStickyHeaderItemRender.call(undefined, renderer, {}) : renderer))))));
|
|
91
|
-
}, [props.header, columns, groupHeader]);
|
|
89
|
+
groupHeader && showStickyHeader && React.createElement("tr", { className: 'k-table-group-row' }, props.groupStickyHeaderItemRender ? props.groupStickyHeaderItemRender.call(undefined, renderer, {}) : renderer))))));
|
|
90
|
+
}, [props.header, columns, groupHeader, showStickyHeader]);
|
|
92
91
|
var popupWidth = React.useMemo(function () {
|
|
93
92
|
// These additional 4px are coming from the child elements side borders (fixes horizontal scrollbar)
|
|
94
93
|
return "calc(".concat(columns.map(function (column) { return columnWidth(column.width, defaultProps.width); }).filter(Boolean).join(' + '), " + ").concat(scrollbarWidth, "px + 4px)");
|
|
@@ -124,17 +123,38 @@ export var MultiColumnComboBox = React.forwardRef(function (directProps, ref) {
|
|
|
124
123
|
handler.call(undefined, __assign(__assign({}, event), { target: target.current }));
|
|
125
124
|
}
|
|
126
125
|
}, []);
|
|
127
|
-
var onOpenHandler = React.useCallback(function (event) {
|
|
126
|
+
var onOpenHandler = React.useCallback(function (event) {
|
|
127
|
+
// Resets the sticky header group value for scenarios with open/close of component's popup
|
|
128
|
+
if (!props.virtual) {
|
|
129
|
+
setGroupHeader(initialGroupHeader);
|
|
130
|
+
}
|
|
131
|
+
;
|
|
132
|
+
return handleEvent(onOpen, event);
|
|
133
|
+
}, [handleEvent, onOpen, props.virtual, initialGroupHeader]);
|
|
128
134
|
var onCloseHandler = React.useCallback(function (event) { return handleEvent(onClose, event); }, [onClose]);
|
|
129
135
|
var onFocusHandler = React.useCallback(function (event) { return handleEvent(onFocus, event); }, [onFocus]);
|
|
130
136
|
var onBlurHandler = React.useCallback(function (event) { return handleEvent(onBlur, event); }, [onBlur]);
|
|
131
137
|
var onChangeHandler = React.useCallback(function (event) { return handleEvent(onChange, event); }, [onChange]);
|
|
132
138
|
var onPageChangeHandler = React.useCallback(function (event) { return handleEvent(onPageChange, event); }, [onPageChange]);
|
|
133
|
-
var onFilterChangeHandler = React.useCallback(function (event) {
|
|
139
|
+
var onFilterChangeHandler = React.useCallback(function (event) {
|
|
140
|
+
setGroupHeader(initialGroupHeader);
|
|
141
|
+
return handleEvent(onFilterChange, __assign(__assign({}, event), { mobileMode: event.target.mobileMode }));
|
|
142
|
+
}, [onFilterChange]);
|
|
134
143
|
var onGroupScroll = React.useCallback(function (event) {
|
|
135
144
|
setGroupHeader(event.group);
|
|
136
145
|
}, []);
|
|
137
146
|
React.useEffect(function () { setScrollbarWidth(); });
|
|
147
|
+
React.useEffect(function () {
|
|
148
|
+
var data = props.data;
|
|
149
|
+
setGroupHeader(initialGroupHeader);
|
|
150
|
+
if (data && data.length !== 0) {
|
|
151
|
+
setShowStickyHeader(true);
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
setShowStickyHeader(false);
|
|
155
|
+
}
|
|
156
|
+
;
|
|
157
|
+
}, [props.data]);
|
|
138
158
|
var List = React.useCallback(function (listProps) { return React.createElement(MultiColumnList, __assign({}, listProps)); }, []);
|
|
139
159
|
return (React.createElement(ComboBox, __assign({}, other, { list: List, popupSettings: __assign(__assign({ width: popupWidth }, popupSettings), { popupClass: 'k-dropdowngrid-popup k-reset', className: popupSettings.className }), ref: comboBoxRef, header: header, itemRender: itemRender, groupHeaderItemRender: props.groupHeaderItemRender, size: props.size, rounded: props.rounded, fillMode: props.fillMode, groupMode: props.groupMode, groupField: props.groupField, isMultiColumn: true, onOpen: onOpenHandler, onClose: onCloseHandler, onFocus: onFocusHandler, onBlur: onBlurHandler, onChange: onChangeHandler, onFilterChange: onFilterChangeHandler, onPageChange: onPageChangeHandler, onGroupScroll: onGroupScroll, className: classNames('k-dropdowngrid', className), required: props.required, adaptive: props.adaptive, adaptiveFilter: props.adaptiveFilter, adaptiveTitle: props.adaptiveTitle })));
|
|
140
160
|
});
|
|
@@ -12,7 +12,7 @@ export interface MultiSelectState extends DropDownStateBase {
|
|
|
12
12
|
focusedTag?: TagData;
|
|
13
13
|
activedescendant?: ActiveDescendant;
|
|
14
14
|
value?: Array<any>;
|
|
15
|
-
|
|
15
|
+
currentValue?: Array<any>;
|
|
16
16
|
windowWidth?: number;
|
|
17
17
|
}
|
|
18
18
|
/** @hidden */
|
|
@@ -73,7 +73,7 @@ var MultiSelectWithoutContext = /** @class */ (function (_super) {
|
|
|
73
73
|
/** @hidden */
|
|
74
74
|
_this.state = {
|
|
75
75
|
activedescendant: ActiveDescendant.PopupList,
|
|
76
|
-
|
|
76
|
+
currentValue: []
|
|
77
77
|
};
|
|
78
78
|
_this._element = null;
|
|
79
79
|
_this._valueItemsDuringOnChange = null;
|
|
@@ -107,12 +107,16 @@ var MultiSelectWithoutContext = /** @class */ (function (_super) {
|
|
|
107
107
|
newItems = __spreadArray(__spreadArray([], _this.value, true), [dataItem], false);
|
|
108
108
|
}
|
|
109
109
|
var text = _this.props.filter !== undefined ? _this.props.filter : _this.state.text;
|
|
110
|
-
if (text) {
|
|
110
|
+
if (text && !_this.mobileMode) {
|
|
111
111
|
if (_this.state.text) {
|
|
112
112
|
state.data.text = '';
|
|
113
113
|
}
|
|
114
114
|
_this.base.filterChanged('', state);
|
|
115
115
|
}
|
|
116
|
+
if (_this._adaptiveInput) {
|
|
117
|
+
_this._adaptiveInput.blur();
|
|
118
|
+
}
|
|
119
|
+
;
|
|
116
120
|
if (_this.state.focusedIndex !== undefined) {
|
|
117
121
|
state.data.focusedIndex = undefined;
|
|
118
122
|
}
|
|
@@ -126,7 +130,7 @@ var MultiSelectWithoutContext = /** @class */ (function (_super) {
|
|
|
126
130
|
if (_this.opened) {
|
|
127
131
|
_this.base.togglePopup(state);
|
|
128
132
|
}
|
|
129
|
-
if (!_this.state.focused) {
|
|
133
|
+
if (!_this.state.focused && !_this.mobileMode) {
|
|
130
134
|
state.data.focused = true;
|
|
131
135
|
_this.focus();
|
|
132
136
|
}
|
|
@@ -176,10 +180,11 @@ var MultiSelectWithoutContext = /** @class */ (function (_super) {
|
|
|
176
180
|
state.data.focusedIndex = undefined;
|
|
177
181
|
if (!_this.opened) {
|
|
178
182
|
_this.base.togglePopup(state);
|
|
179
|
-
_this.setState({
|
|
183
|
+
_this.setState({ currentValue: _this.value });
|
|
180
184
|
}
|
|
181
185
|
_this.base.filterChanged(value, state);
|
|
182
186
|
_this.applyState(state);
|
|
187
|
+
_this.setState({ group: undefined });
|
|
183
188
|
};
|
|
184
189
|
_this.clearButtonClick = function (event) {
|
|
185
190
|
var state = _this.base.initState();
|
|
@@ -267,7 +272,7 @@ var MultiSelectWithoutContext = /** @class */ (function (_super) {
|
|
|
267
272
|
_b["k-list-".concat(_this.mobileMode ? 'lg' : sizeMap[size] || size)] = size,
|
|
268
273
|
_b['k-virtual-list'] = _this.base.vs.enabled,
|
|
269
274
|
_b)) },
|
|
270
|
-
!list && group && React.createElement(GroupStickyHeader, { group: group, groupMode: 'modern', render: groupStickyHeaderItemRender }),
|
|
275
|
+
!list && group && data.length !== 0 && React.createElement(GroupStickyHeader, { group: group, groupMode: 'modern', render: groupStickyHeaderItemRender }),
|
|
271
276
|
_this.renderList()),
|
|
272
277
|
footer && React.createElement("div", { className: "k-list-footer" }, footer)));
|
|
273
278
|
};
|
|
@@ -298,11 +303,13 @@ var MultiSelectWithoutContext = /** @class */ (function (_super) {
|
|
|
298
303
|
var _b = _this.state.windowWidth, windowWidth = _b === void 0 ? 0 : _b;
|
|
299
304
|
var mobileText = filter !== undefined ? filter : _this.state.text;
|
|
300
305
|
_this.localization = provideLocalizationService(_this);
|
|
306
|
+
var mobileFilter = filterable ? (React.createElement(ListFilter, { value: mobileText, ref: function (adaptiveFilter) { return _this._adaptiveInput = adaptiveFilter && adaptiveFilter.input; }, onChange: _this.onChangeHandler, onKeyDown: _this.onInputKeyDown, size: _this.props.size, rounded: _this.props.rounded, fillMode: _this.props.fillMode })) : null;
|
|
301
307
|
var actionSheetProps = {
|
|
302
308
|
adaptiveTitle: adaptiveTitle,
|
|
303
309
|
expand: _this.opened,
|
|
304
310
|
onClose: function (event) { return _this.onCancel(event); },
|
|
305
311
|
windowWidth: windowWidth,
|
|
312
|
+
mobileFilter: mobileFilter,
|
|
306
313
|
footer: {
|
|
307
314
|
cancelText: _this.localization.toLanguageString(adaptiveModeFooterCancel, messages[adaptiveModeFooterCancel]),
|
|
308
315
|
onCancel: function (event) { return _this.onCancel(event); },
|
|
@@ -312,8 +319,8 @@ var MultiSelectWithoutContext = /** @class */ (function (_super) {
|
|
|
312
319
|
};
|
|
313
320
|
return (React.createElement(AdaptiveMode, __assign({}, actionSheetProps),
|
|
314
321
|
React.createElement(ActionSheetContent, { className: '!k-overflow-hidden' },
|
|
315
|
-
|
|
316
|
-
|
|
322
|
+
React.createElement("div", { className: 'k-list-container' },
|
|
323
|
+
React.createElement("div", { className: 'k-list k-list-lg' }, _this.listContainerContent())))));
|
|
317
324
|
};
|
|
318
325
|
_this.closePopup = function (event) {
|
|
319
326
|
var state = _this.base.initState();
|
|
@@ -426,7 +433,7 @@ var MultiSelectWithoutContext = /** @class */ (function (_super) {
|
|
|
426
433
|
state.data.focused = true;
|
|
427
434
|
}
|
|
428
435
|
if (_this.mobileMode) {
|
|
429
|
-
_this.setState({
|
|
436
|
+
_this.setState({ currentValue: _this.tagsToRender });
|
|
430
437
|
if (_this.mobileMode) {
|
|
431
438
|
window.setTimeout(function () { return _this._adaptiveInput && _this._adaptiveInput.focus(); }, 300);
|
|
432
439
|
}
|
|
@@ -622,8 +629,7 @@ var MultiSelectWithoutContext = /** @class */ (function (_super) {
|
|
|
622
629
|
/** @hidden */
|
|
623
630
|
MultiSelectWithoutContext.prototype.componentDidUpdate = function (prevProps, prevState) {
|
|
624
631
|
var _a;
|
|
625
|
-
var _b = this.props, virtual = _b.virtual, _c = _b.groupField, groupField = _c === void 0 ? '' : _c;
|
|
626
|
-
var _d = this.props.data, data = _d === void 0 ? [] : _d;
|
|
632
|
+
var _b = this.props, virtual = _b.virtual, _c = _b.groupField, groupField = _c === void 0 ? '' : _c, _d = _b.data, data = _d === void 0 ? [] : _d;
|
|
627
633
|
var skip = virtual ? virtual.skip : 0;
|
|
628
634
|
var prevTotal = prevProps.virtual ? prevProps.virtual.total : 0;
|
|
629
635
|
var prevOpened = prevProps.opened !== undefined ? prevProps.opened : prevState.opened;
|
|
@@ -646,6 +652,10 @@ var MultiSelectWithoutContext = /** @class */ (function (_super) {
|
|
|
646
652
|
this.base.scrollToVirtualItem(virtual, focusedIndex - skip);
|
|
647
653
|
}
|
|
648
654
|
else if (opening && !virtual) {
|
|
655
|
+
// Resets the sticky header group value for scenarios with open/close of component's popup
|
|
656
|
+
if (data && data.length !== 0) {
|
|
657
|
+
this.base.resetGroupStickyHeader(data[0][groupField], this);
|
|
658
|
+
}
|
|
649
659
|
this.base.scrollToItem(focusedIndex);
|
|
650
660
|
}
|
|
651
661
|
else if (this.opened && prevOpened && focusedItem && this.scrollToFocused) {
|
|
@@ -704,7 +714,7 @@ var MultiSelectWithoutContext = /** @class */ (function (_super) {
|
|
|
704
714
|
MultiSelectWithoutContext.prototype.render = function () {
|
|
705
715
|
var _a, _b;
|
|
706
716
|
var _c = this.props, style = _c.style, className = _c.className, label = _c.label, dir = _c.dir, disabled = _c.disabled, textField = _c.textField, dataItemKey = _c.dataItemKey, virtual = _c.virtual, size = _c.size, rounded = _c.rounded, fillMode = _c.fillMode, loading = _c.loading, filter = _c.filter;
|
|
707
|
-
var _d = this.state, text = _d.text, focused = _d.focused, focusedTag = _d.focusedTag,
|
|
717
|
+
var _d = this.state, text = _d.text, focused = _d.focused, focusedTag = _d.focusedTag, currentValue = _d.currentValue;
|
|
708
718
|
var vs = this.base.vs;
|
|
709
719
|
var id = this.props.id || this._inputId;
|
|
710
720
|
vs.enabled = virtual !== undefined;
|
|
@@ -713,7 +723,7 @@ var MultiSelectWithoutContext = /** @class */ (function (_super) {
|
|
|
713
723
|
vs.total = virtual.total;
|
|
714
724
|
vs.pageSize = virtual.pageSize;
|
|
715
725
|
}
|
|
716
|
-
var currentTagsToRender = (this.mobileMode && this.opened) ?
|
|
726
|
+
var currentTagsToRender = (this.mobileMode && this.opened) ? currentValue : this.tagsToRender;
|
|
717
727
|
this.setItems(this.tagsToRender, this._tags);
|
|
718
728
|
var isValid = !this.validityStyles || this.validity.valid;
|
|
719
729
|
var clearButton = Boolean(filter !== undefined ? filter : text)
|
|
@@ -741,12 +751,12 @@ var MultiSelectWithoutContext = /** @class */ (function (_super) {
|
|
|
741
751
|
return label ? (React.createElement(FloatingLabel, { label: label, editorId: id, editorValue: text || getItemValue(this.value[0], textField), editorValid: isValid, editorDisabled: disabled, style: { width: style ? style.width : undefined }, children: component })) : component;
|
|
742
752
|
};
|
|
743
753
|
MultiSelectWithoutContext.prototype.renderSearchBar = function (id) {
|
|
744
|
-
var _a = this.state, activedescendant = _a.activedescendant, focusedTag = _a.focusedTag,
|
|
754
|
+
var _a = this.state, activedescendant = _a.activedescendant, focusedTag = _a.focusedTag, currentValue = _a.currentValue;
|
|
745
755
|
var _b = this.props, disabled = _b.disabled, placeholder = _b.placeholder, ariaDescribedBy = _b.ariaDescribedBy;
|
|
746
756
|
var text = !this.mobileMode && (this.props.filter !== undefined ? this.props.filter : this.state.text) || '';
|
|
747
757
|
var focusedIndex = this.getFocusedState().focusedIndex;
|
|
748
758
|
var placeholderToShow = this.value.length === 0 && !text ? placeholder : undefined;
|
|
749
|
-
var adaptivePlaceholder = (
|
|
759
|
+
var adaptivePlaceholder = (currentValue && currentValue.length > 0) ? undefined : placeholder;
|
|
750
760
|
var ariaActivedescendant = activedescendant === ActiveDescendant.TagsList && focusedTag !== undefined ?
|
|
751
761
|
"tag-".concat(this.base.guid, "-").concat(focusedTag.text.replace(/\s+/g, '-')) :
|
|
752
762
|
"option-".concat(this.base.guid, "-").concat(focusedIndex);
|
|
@@ -159,7 +159,7 @@ export interface MultiSelectProps extends FormComponentProps {
|
|
|
159
159
|
*/
|
|
160
160
|
filter?: string;
|
|
161
161
|
/**
|
|
162
|
-
* Sets the value of the adaptive filtering input of the of
|
|
162
|
+
* Sets the value of the adaptive filtering input of the of MultiSelect.
|
|
163
163
|
*/
|
|
164
164
|
adaptiveFilter?: string;
|
|
165
165
|
/**
|
|
@@ -161,4 +161,5 @@ export default class DropDownBase {
|
|
|
161
161
|
renderScrollElement: () => false | JSX.Element;
|
|
162
162
|
getPopupSettings(): DropDownsPopupSettings;
|
|
163
163
|
getGroupedDataModernMode(data: any[], groupField: string): any[];
|
|
164
|
+
resetGroupStickyHeader: (groupName: string, that: any) => void;
|
|
164
165
|
}
|
|
@@ -103,6 +103,11 @@ var DropDownBase = /** @class */ (function () {
|
|
|
103
103
|
var vs = _this.vs;
|
|
104
104
|
return vs.enabled && (React.createElement("div", { ref: function (element) { return vs.scrollElement = element; }, key: 'scrollElementKey' }));
|
|
105
105
|
};
|
|
106
|
+
this.resetGroupStickyHeader = function (groupName, that) {
|
|
107
|
+
if (groupName !== that.state.group) {
|
|
108
|
+
that.setState(__assign(__assign({}, that.state), { group: groupName }));
|
|
109
|
+
}
|
|
110
|
+
};
|
|
106
111
|
this.listBoxId = guid();
|
|
107
112
|
this.guid = guid();
|
|
108
113
|
this.component = component;
|
|
@@ -15,7 +15,5 @@ import List from './List';
|
|
|
15
15
|
* @hidden
|
|
16
16
|
*/
|
|
17
17
|
export var MultiColumnList = function (props) {
|
|
18
|
-
// eslint-disable-next-line no-console
|
|
19
|
-
console.log('%c- props.listStyle:', 'color: #ff4081; font-weight: bold', __assign({}, props.listStyle));
|
|
20
18
|
return (React.createElement(List, __assign({}, props, { wrapperCssClass: "k-table-body k-table-scroller", listClassName: "k-table k-table-list", listStyle: __assign({}, props.listStyle) })));
|
|
21
19
|
};
|
|
@@ -5,7 +5,7 @@ export var packageMetadata = {
|
|
|
5
5
|
name: '@progress/kendo-react-dropdowns',
|
|
6
6
|
productName: 'KendoReact',
|
|
7
7
|
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
8
|
-
publishDate:
|
|
8
|
+
publishDate: 1682418128,
|
|
9
9
|
version: '',
|
|
10
10
|
licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
|
|
11
11
|
};
|
|
@@ -167,6 +167,7 @@ var AutoCompleteWithoutContext = /** @class */ (function (_super) {
|
|
|
167
167
|
}
|
|
168
168
|
state.data.focusedItem = undefined;
|
|
169
169
|
_this.applyState(state);
|
|
170
|
+
_this.setState({ group: undefined });
|
|
170
171
|
};
|
|
171
172
|
_this.clearButtonClick = function (event) {
|
|
172
173
|
var base = _this.base;
|
|
@@ -324,6 +325,14 @@ var AutoCompleteWithoutContext = /** @class */ (function (_super) {
|
|
|
324
325
|
}
|
|
325
326
|
else if (!this._isScrolling) {
|
|
326
327
|
var focusedItemIndex = (_a = this.base.getGroupedDataModernMode(data, groupField)) === null || _a === void 0 ? void 0 : _a.indexOf(focusedItem);
|
|
328
|
+
if (opening) {
|
|
329
|
+
// Resets the sticky header group value for scenarios with open/close of component's popup
|
|
330
|
+
if (data && data.length !== 0) {
|
|
331
|
+
this.base.resetGroupStickyHeader(data[0][groupField], this);
|
|
332
|
+
}
|
|
333
|
+
this.base.scrollToItem(focusedItemIndex);
|
|
334
|
+
}
|
|
335
|
+
;
|
|
327
336
|
if (opened && prevOpened && focusedItemChanged) {
|
|
328
337
|
this.base.scrollToItem(focusedItemIndex);
|
|
329
338
|
}
|
|
@@ -443,7 +452,7 @@ var AutoCompleteWithoutContext = /** @class */ (function (_super) {
|
|
|
443
452
|
React.createElement("div", { className: (0, kendo_react_common_1.classNames)('k-list', (_a = {},
|
|
444
453
|
_a["k-list-".concat(sizeMap[size] || size)] = size,
|
|
445
454
|
_a)) },
|
|
446
|
-
!list && group && React.createElement(GroupStickyHeader_1.default, { group: group, groupMode: 'modern', render: groupStickyHeaderItemRender }),
|
|
455
|
+
!list && group && data.length !== 0 && React.createElement(GroupStickyHeader_1.default, { group: group, groupMode: 'modern', render: groupStickyHeaderItemRender }),
|
|
447
456
|
this.renderList()),
|
|
448
457
|
footer && React.createElement("div", { className: "k-list-footer" }, footer)));
|
|
449
458
|
};
|
|
@@ -242,6 +242,7 @@ var ComboBoxWithoutContext = /** @class */ (function (_super) {
|
|
|
242
242
|
}
|
|
243
243
|
_this.base.filterChanged(value, state);
|
|
244
244
|
_this.applyState(state);
|
|
245
|
+
_this.setState({ group: undefined });
|
|
245
246
|
};
|
|
246
247
|
_this.clearButtonClick = function (event) {
|
|
247
248
|
var state = _this.base.initState();
|
|
@@ -387,8 +388,7 @@ var ComboBoxWithoutContext = /** @class */ (function (_super) {
|
|
|
387
388
|
/** @hidden */
|
|
388
389
|
ComboBoxWithoutContext.prototype.componentDidUpdate = function (prevProps, prevState) {
|
|
389
390
|
var _a;
|
|
390
|
-
var _b = this.props, dataItemKey = _b.dataItemKey, virtual = _b.virtual, _c = _b.groupField, groupField = _c === void 0 ? '' : _c;
|
|
391
|
-
var _d = this.props.data, data = _d === void 0 ? [] : _d;
|
|
391
|
+
var _b = this.props, dataItemKey = _b.dataItemKey, virtual = _b.virtual, _c = _b.groupField, groupField = _c === void 0 ? '' : _c, _d = _b.data, data = _d === void 0 ? [] : _d;
|
|
392
392
|
var prevTotal = prevProps.virtual ? prevProps.virtual.total : 0;
|
|
393
393
|
var opened = this.props.opened !== undefined ? this.props.opened : this.state.opened;
|
|
394
394
|
var prevOpened = prevProps.opened !== undefined ? prevProps.opened : prevState.opened;
|
|
@@ -412,6 +412,10 @@ var ComboBoxWithoutContext = /** @class */ (function (_super) {
|
|
|
412
412
|
}
|
|
413
413
|
else if (opening && !virtual) {
|
|
414
414
|
this.onPopupOpened();
|
|
415
|
+
// Resets the sticky header group value for scenarios with open/close of component's popup
|
|
416
|
+
if (data && data.length !== 0) {
|
|
417
|
+
this.base.resetGroupStickyHeader(data[0][groupField], this);
|
|
418
|
+
}
|
|
415
419
|
this.base.scrollToItem(selectedItemIndex);
|
|
416
420
|
}
|
|
417
421
|
else if (opened && prevOpened && selectedItem && selectedItemChanged) {
|
|
@@ -632,7 +636,7 @@ var ComboBoxWithoutContext = /** @class */ (function (_super) {
|
|
|
632
636
|
_a["k-table-".concat(sizeMap[size] || size)] = list && size,
|
|
633
637
|
_a)) },
|
|
634
638
|
header && React.createElement("div", { className: "k-table-header" }, header),
|
|
635
|
-
!list && group && React.createElement(GroupStickyHeader_1.default, { group: group, groupMode: groupMode, render: groupStickyHeaderItemRender }),
|
|
639
|
+
!list && group && data.length !== 0 && React.createElement(GroupStickyHeader_1.default, { group: group, groupMode: groupMode, render: groupStickyHeaderItemRender }),
|
|
636
640
|
this.renderList(),
|
|
637
641
|
footer && React.createElement("div", { className: "k-list-footer" }, footer)))))));
|
|
638
642
|
};
|
|
@@ -663,7 +667,7 @@ var ComboBoxWithoutContext = /** @class */ (function (_super) {
|
|
|
663
667
|
_a["k-table-".concat(sizeMap[size] || size)] = list && size,
|
|
664
668
|
_a)) },
|
|
665
669
|
header && React.createElement("div", { className: "k-table-header" }, header),
|
|
666
|
-
!list && group && React.createElement(GroupStickyHeader_1.default, { group: group, groupMode: groupMode, render: groupStickyHeaderItemRender }),
|
|
670
|
+
!list && group && data.length !== 0 && React.createElement(GroupStickyHeader_1.default, { group: group, groupMode: groupMode, render: groupStickyHeaderItemRender }),
|
|
667
671
|
this.renderList(),
|
|
668
672
|
footer && React.createElement("div", { className: "k-list-footer" }, footer))));
|
|
669
673
|
};
|
|
@@ -130,7 +130,7 @@ var DropDownListWithoutContext = /** @class */ (function (_super) {
|
|
|
130
130
|
header && React.createElement("div", { className: "k-list-header" }, header),
|
|
131
131
|
React.createElement("div", { className: (0, kendo_react_common_1.classNames)('k-list', (_a = {}, _a["k-list-".concat(sizeMap[size] || size)] = size, _a['k-virtual-list'] = _this.base.vs.enabled, _a)) },
|
|
132
132
|
_this.renderDefaultItem(),
|
|
133
|
-
!list && group && React.createElement(GroupStickyHeader_1.default, { group: group, groupMode: 'modern', render: groupStickyHeaderItemRender }),
|
|
133
|
+
!list && group && data.length !== 0 && React.createElement(GroupStickyHeader_1.default, { group: group, groupMode: 'modern', render: groupStickyHeaderItemRender }),
|
|
134
134
|
_this.renderList()),
|
|
135
135
|
footer && React.createElement("div", { className: "k-list-footer" }, footer)));
|
|
136
136
|
};
|
|
@@ -294,11 +294,14 @@ var DropDownListWithoutContext = /** @class */ (function (_super) {
|
|
|
294
294
|
return;
|
|
295
295
|
}
|
|
296
296
|
var opened = _this.props.opened !== undefined ? _this.props.opened : _this.state.opened;
|
|
297
|
+
var adaptive = _this.props.adaptive;
|
|
298
|
+
var _a = _this.state.windowWidth, windowWidth = _a === void 0 ? 0 : _a;
|
|
299
|
+
var renderAdaptive = windowWidth <= constants_1.MOBILE_MEDIUM_DEVISE && adaptive;
|
|
297
300
|
var state = _this.base.initState();
|
|
298
301
|
state.syntheticEvent = event;
|
|
299
302
|
state.data.focused = false;
|
|
300
303
|
state.events.push({ type: 'onBlur' });
|
|
301
|
-
if (opened) {
|
|
304
|
+
if (opened && !renderAdaptive) {
|
|
302
305
|
_this.base.togglePopup(state);
|
|
303
306
|
}
|
|
304
307
|
_this.applyState(state);
|
|
@@ -347,6 +350,7 @@ var DropDownListWithoutContext = /** @class */ (function (_super) {
|
|
|
347
350
|
}
|
|
348
351
|
_this.base.filterChanged(event.target.value, state);
|
|
349
352
|
_this.applyState(state);
|
|
353
|
+
_this.setState({ group: undefined });
|
|
350
354
|
};
|
|
351
355
|
_this.onPopupOpened = function () {
|
|
352
356
|
if (_this._filterInput) {
|
|
@@ -525,6 +529,10 @@ var DropDownListWithoutContext = /** @class */ (function (_super) {
|
|
|
525
529
|
}
|
|
526
530
|
else if (opening && !virtual) {
|
|
527
531
|
this.onPopupOpened();
|
|
532
|
+
// Resets the sticky header group value for scenarios with open/close of component's popup
|
|
533
|
+
if (data && data.length !== 0) {
|
|
534
|
+
this.base.resetGroupStickyHeader(data[0][groupField], this);
|
|
535
|
+
}
|
|
528
536
|
this.base.scrollToItem(selectedItemIndex);
|
|
529
537
|
}
|
|
530
538
|
else if (opened && prevOpened && selectedItem_1 && selectedItemChanged && !this._navigated) {
|
|
@@ -669,7 +677,7 @@ var DropDownListWithoutContext = /** @class */ (function (_super) {
|
|
|
669
677
|
header && React.createElement("div", { className: "k-list-header" }, header),
|
|
670
678
|
React.createElement("div", { className: (0, kendo_react_common_1.classNames)('k-list', (_a = {}, _a["k-list-".concat(sizeMap[size] || size)] = size, _a['k-virtual-list'] = this.base.vs.enabled, _a)) },
|
|
671
679
|
this.renderDefaultItem(),
|
|
672
|
-
!list && group && React.createElement(GroupStickyHeader_1.default, { group: group, groupMode: 'modern', render: groupStickyHeaderItemRender }),
|
|
680
|
+
!list && group && data.length !== 0 && React.createElement(GroupStickyHeader_1.default, { group: group, groupMode: 'modern', render: groupStickyHeaderItemRender }),
|
|
673
681
|
this.renderList()),
|
|
674
682
|
footer && React.createElement("div", { className: "k-list-footer" }, footer)))));
|
|
675
683
|
};
|
|
@@ -70,15 +70,14 @@ exports.MultiColumnComboBox = React.forwardRef(function (directProps, ref) {
|
|
|
70
70
|
});
|
|
71
71
|
React.useImperativeHandle(ref, function () { return target.current; });
|
|
72
72
|
var initialGroupHeader = React.useMemo(function () {
|
|
73
|
-
if (
|
|
73
|
+
if (props.groupField !== undefined && props.data) {
|
|
74
74
|
return (0, utils_1.getItemValue)(props.data[0], props.groupField);
|
|
75
75
|
}
|
|
76
76
|
}, [props.data, props.groupField]);
|
|
77
77
|
var _c = React.useState(initialGroupHeader), groupHeader = _c[0], setGroupHeader = _c[1];
|
|
78
|
+
var _d = React.useState(true), showStickyHeader = _d[0], setShowStickyHeader = _d[1];
|
|
78
79
|
var header = React.useMemo(function () {
|
|
79
|
-
var renderer = (React.createElement("th", { className: 'k-table-th', colSpan: columns.length },
|
|
80
|
-
groupHeader,
|
|
81
|
-
" "));
|
|
80
|
+
var renderer = (React.createElement("th", { className: 'k-table-th', colSpan: columns.length }, groupHeader));
|
|
82
81
|
return (React.createElement(React.Fragment, null,
|
|
83
82
|
props.header,
|
|
84
83
|
React.createElement("div", { className: "k-table-header-wrap" },
|
|
@@ -90,8 +89,8 @@ exports.MultiColumnComboBox = React.forwardRef(function (directProps, ref) {
|
|
|
90
89
|
React.createElement("tr", { className: 'k-table-row' }, columns.map(function (column, i) {
|
|
91
90
|
return (React.createElement("th", { className: "k-table-th", key: column.uniqueKey ? column.uniqueKey : i }, column.header || '\u00A0'));
|
|
92
91
|
})),
|
|
93
|
-
groupHeader && React.createElement("tr", { className: 'k-table-group-row' }, props.groupStickyHeaderItemRender ? props.groupStickyHeaderItemRender.call(undefined, renderer, {}) : renderer))))));
|
|
94
|
-
}, [props.header, columns, groupHeader]);
|
|
92
|
+
groupHeader && showStickyHeader && React.createElement("tr", { className: 'k-table-group-row' }, props.groupStickyHeaderItemRender ? props.groupStickyHeaderItemRender.call(undefined, renderer, {}) : renderer))))));
|
|
93
|
+
}, [props.header, columns, groupHeader, showStickyHeader]);
|
|
95
94
|
var popupWidth = React.useMemo(function () {
|
|
96
95
|
// These additional 4px are coming from the child elements side borders (fixes horizontal scrollbar)
|
|
97
96
|
return "calc(".concat(columns.map(function (column) { return columnWidth(column.width, defaultProps.width); }).filter(Boolean).join(' + '), " + ").concat(scrollbarWidth, "px + 4px)");
|
|
@@ -127,17 +126,38 @@ exports.MultiColumnComboBox = React.forwardRef(function (directProps, ref) {
|
|
|
127
126
|
handler.call(undefined, __assign(__assign({}, event), { target: target.current }));
|
|
128
127
|
}
|
|
129
128
|
}, []);
|
|
130
|
-
var onOpenHandler = React.useCallback(function (event) {
|
|
129
|
+
var onOpenHandler = React.useCallback(function (event) {
|
|
130
|
+
// Resets the sticky header group value for scenarios with open/close of component's popup
|
|
131
|
+
if (!props.virtual) {
|
|
132
|
+
setGroupHeader(initialGroupHeader);
|
|
133
|
+
}
|
|
134
|
+
;
|
|
135
|
+
return handleEvent(onOpen, event);
|
|
136
|
+
}, [handleEvent, onOpen, props.virtual, initialGroupHeader]);
|
|
131
137
|
var onCloseHandler = React.useCallback(function (event) { return handleEvent(onClose, event); }, [onClose]);
|
|
132
138
|
var onFocusHandler = React.useCallback(function (event) { return handleEvent(onFocus, event); }, [onFocus]);
|
|
133
139
|
var onBlurHandler = React.useCallback(function (event) { return handleEvent(onBlur, event); }, [onBlur]);
|
|
134
140
|
var onChangeHandler = React.useCallback(function (event) { return handleEvent(onChange, event); }, [onChange]);
|
|
135
141
|
var onPageChangeHandler = React.useCallback(function (event) { return handleEvent(onPageChange, event); }, [onPageChange]);
|
|
136
|
-
var onFilterChangeHandler = React.useCallback(function (event) {
|
|
142
|
+
var onFilterChangeHandler = React.useCallback(function (event) {
|
|
143
|
+
setGroupHeader(initialGroupHeader);
|
|
144
|
+
return handleEvent(onFilterChange, __assign(__assign({}, event), { mobileMode: event.target.mobileMode }));
|
|
145
|
+
}, [onFilterChange]);
|
|
137
146
|
var onGroupScroll = React.useCallback(function (event) {
|
|
138
147
|
setGroupHeader(event.group);
|
|
139
148
|
}, []);
|
|
140
149
|
React.useEffect(function () { (0, kendo_react_common_1.setScrollbarWidth)(); });
|
|
150
|
+
React.useEffect(function () {
|
|
151
|
+
var data = props.data;
|
|
152
|
+
setGroupHeader(initialGroupHeader);
|
|
153
|
+
if (data && data.length !== 0) {
|
|
154
|
+
setShowStickyHeader(true);
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
setShowStickyHeader(false);
|
|
158
|
+
}
|
|
159
|
+
;
|
|
160
|
+
}, [props.data]);
|
|
141
161
|
var List = React.useCallback(function (listProps) { return React.createElement(MultiColumnList_1.MultiColumnList, __assign({}, listProps)); }, []);
|
|
142
162
|
return (React.createElement(ComboBox_1.ComboBox, __assign({}, other, { list: List, popupSettings: __assign(__assign({ width: popupWidth }, popupSettings), { popupClass: 'k-dropdowngrid-popup k-reset', className: popupSettings.className }), ref: comboBoxRef, header: header, itemRender: itemRender, groupHeaderItemRender: props.groupHeaderItemRender, size: props.size, rounded: props.rounded, fillMode: props.fillMode, groupMode: props.groupMode, groupField: props.groupField, isMultiColumn: true, onOpen: onOpenHandler, onClose: onCloseHandler, onFocus: onFocusHandler, onBlur: onBlurHandler, onChange: onChangeHandler, onFilterChange: onFilterChangeHandler, onPageChange: onPageChangeHandler, onGroupScroll: onGroupScroll, className: (0, kendo_react_common_1.classNames)('k-dropdowngrid', className), required: props.required, adaptive: props.adaptive, adaptiveFilter: props.adaptiveFilter, adaptiveTitle: props.adaptiveTitle })));
|
|
143
163
|
});
|
|
@@ -12,7 +12,7 @@ export interface MultiSelectState extends DropDownStateBase {
|
|
|
12
12
|
focusedTag?: TagData;
|
|
13
13
|
activedescendant?: ActiveDescendant;
|
|
14
14
|
value?: Array<any>;
|
|
15
|
-
|
|
15
|
+
currentValue?: Array<any>;
|
|
16
16
|
windowWidth?: number;
|
|
17
17
|
}
|
|
18
18
|
/** @hidden */
|