Skip to content

Commit f207939

Browse files
committed
Sync with Kendo UI Professional
1 parent d8d37e0 commit f207939

File tree

6 files changed

+44
-4
lines changed

6 files changed

+44
-4
lines changed

src/kendo.actionsheet.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,13 @@ export const __meta__ = {
165165
if (that.views.length) {
166166
that.views.splice(index, 1);
167167
if (view._content) {
168-
that._content.splice(index, 1);
168+
Array.prototype.splice.call(that._content, index, 1);
169169
}
170170
if (view._footer) {
171-
that._footer.splice(index, 1);
171+
Array.prototype.splice.call(that._footer, index, 1);
172172
}
173173
if (view._header) {
174-
that._header.splice(index, 1);
174+
Array.prototype.splice.call(that._header, index, 1);
175175
}
176176

177177
view.destroy();

src/kendo.dropdownlist.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ export const __meta__ = {
112112
that.requireValueMapper(that.options);
113113
that._initList();
114114
that.listView.one("dataBound", that._attachAriaActiveDescendant.bind(that));
115+
that.listView.bind("dataBound", () => that._refreshFloatingLabel());
115116

116117
that._cascade();
117118

src/kendo.multiselect.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ export const __meta__ = {
181181
},
182182
enforceMinLength: false,
183183
delay: 100,
184+
downArrow: false,
184185
value: null,
185186
maxSelectedItems: null,
186187
placeholder: "",

src/kendo.validator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ export const __meta__ = {
421421
let fileInput = containerElement.find("input[type='file']");
422422

423423
if (fileInput.length) {
424-
inputs.push($(fileInput.first())[0]);
424+
Array.prototype.push.call(inputs, $(fileInput.first())[0]);
425425
}
426426
for (idx = 0, length = inputs.length; idx < length; idx++) {
427427
if (!this.validateInput(inputs.eq(idx))) {

tests/unit/dropdownlist/virtualization.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,29 @@ describe("kendo.ui.DropDownList Virtualization", function() {
8181
dropdownlist.value("0");
8282
});
8383

84+
asyncTest("renders floating label when value is set and", function(done) {
85+
let dropdownlist = new DropDownList(select, {
86+
autoBind: true,
87+
value: "1",
88+
animation: false,
89+
dataTextField: "text",
90+
dataValueField: "value",
91+
dataSource: createAsyncDataSource(),
92+
label: {
93+
content: "some label",
94+
floating: true
95+
}
96+
});
97+
98+
dropdownlist.one("dataBound", function() {
99+
setTimeout(function() {
100+
let classes = dropdownlist.label.floatingLabel.element.attr("class");
101+
done(() => assert.isNotOk(classes.includes("k-empty")));
102+
}, 100);
103+
104+
});
105+
});
106+
84107
asyncTest("DropDownList selects correct item when optionLabel is defined", function(done) {
85108
let dropdownlist = new DropDownList(select, {
86109
optionLabel: "test",

tests/unit/multiselect/mvvm.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,21 @@ describe('multiselect MVVM', function() {
281281
assert.isOk(observable.value instanceof kendo.data.ObservableArray);
282282
});
283283

284+
it("should display arrow down button", function() {
285+
dom = $('<select data-role="multiselect" multiple="multiple" data-value-field="name" data-bind="source:items, value:value" data-down-arrow="true"/>');
286+
287+
let observable = kendo.observable({
288+
items: [{ name: "foo" }, { name: "bar" }, { name: "baz" }],
289+
value: { name: "foo" }
290+
});
291+
292+
kendo.bind(dom, observable);
293+
const multiselect = dom.data("kendoMultiSelect");
294+
295+
assert.isOk(multiselect._arrow);
296+
assert.isOk(multiselect._arrow.length);
297+
});
298+
284299
it("clearing value of the widget sets value property to empty array", function() {
285300
dom = $('<select data-role="multiselect" multiple="multiple" data-value-field="name" data-bind="source:items, value:value"/>');
286301

0 commit comments

Comments
 (0)