@syncfusion/ej2-lists 20.4.48 → 20.4.50
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 +2 -0
- package/dist/ej2-lists.min.js +2 -2
- package/dist/ej2-lists.umd.min.js +2 -2
- package/dist/ej2-lists.umd.min.js.map +1 -1
- package/dist/es6/ej2-lists.es2015.js +31 -3
- package/dist/es6/ej2-lists.es2015.js.map +1 -1
- package/dist/es6/ej2-lists.es5.js +31 -3
- package/dist/es6/ej2-lists.es5.js.map +1 -1
- package/dist/global/ej2-lists.min.js +2 -2
- package/dist/global/ej2-lists.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +6 -6
- package/src/list-view/list-view.js +1 -1
- package/src/list-view/virtualization.d.ts +14 -0
- package/src/list-view/virtualization.js +29 -1
- package/src/sortable/sortable.js +1 -1
|
@@ -2384,7 +2384,7 @@ var ListView = /** @__PURE__ @class */ (function (_super) {
|
|
|
2384
2384
|
if (this.enableVirtualization) {
|
|
2385
2385
|
if (Object.keys(this.dataSource).length) {
|
|
2386
2386
|
if ((this.template || this.groupTemplate) && !this.virtualizationModule.isNgTemplate()) {
|
|
2387
|
-
if (this.isReact) {
|
|
2387
|
+
if (this.isReact || this.isVue) {
|
|
2388
2388
|
if (typeof this.template == "string") {
|
|
2389
2389
|
this.listBaseOption.template = null;
|
|
2390
2390
|
}
|
|
@@ -3125,6 +3125,14 @@ var Virtualization = /** @__PURE__ @class */ (function () {
|
|
|
3125
3125
|
Virtualization.prototype.isNgTemplate = function () {
|
|
3126
3126
|
return !isNullOrUndefined(this.listViewInstance.templateRef) && typeof this.listViewInstance.templateRef !== 'string';
|
|
3127
3127
|
};
|
|
3128
|
+
/**
|
|
3129
|
+
* Checks if the platform is a Vue and its template property is a function type.
|
|
3130
|
+
*
|
|
3131
|
+
* @returns {boolean} indicating the result of the check
|
|
3132
|
+
*/
|
|
3133
|
+
Virtualization.prototype.isVueFunctionTemplate = function () {
|
|
3134
|
+
return this.listViewInstance.isVue && typeof this.listViewInstance.template === 'function';
|
|
3135
|
+
};
|
|
3128
3136
|
/**
|
|
3129
3137
|
* For internal use only.
|
|
3130
3138
|
*
|
|
@@ -3917,10 +3925,14 @@ var Virtualization = /** @__PURE__ @class */ (function () {
|
|
|
3917
3925
|
this.listViewInstance.template = div.innerHTML;
|
|
3918
3926
|
}
|
|
3919
3927
|
}
|
|
3928
|
+
if (this.isVueFunctionTemplate())
|
|
3929
|
+
return;
|
|
3920
3930
|
template.innerHTML = this.listViewInstance.template;
|
|
3921
3931
|
this.listViewInstance.template = virtualTemplate;
|
|
3922
3932
|
}
|
|
3923
3933
|
else {
|
|
3934
|
+
if (this.isVueFunctionTemplate())
|
|
3935
|
+
return;
|
|
3924
3936
|
template.innerHTML = this.listViewInstance.template || commonTemplate;
|
|
3925
3937
|
}
|
|
3926
3938
|
// eslint-disable-next-line
|
|
@@ -4203,7 +4215,7 @@ var Virtualization = /** @__PURE__ @class */ (function () {
|
|
|
4203
4215
|
};
|
|
4204
4216
|
Virtualization.prototype.updateUI = function (element, index, targetElement) {
|
|
4205
4217
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
4206
|
-
var onChange = this.isNgTemplate() ? this.onNgChange : this.onChange;
|
|
4218
|
+
var onChange = this.isNgTemplate() ? this.onNgChange : (this.isVueFunctionTemplate()) ? this.onVuechange : this.onChange;
|
|
4207
4219
|
if (this.listViewInstance.template || this.listViewInstance.groupTemplate) {
|
|
4208
4220
|
var curViewDS = this.listViewInstance.curViewDS[index];
|
|
4209
4221
|
// eslint-disable-next-line
|
|
@@ -4220,6 +4232,22 @@ var Virtualization = /** @__PURE__ @class */ (function () {
|
|
|
4220
4232
|
this.listViewInstance.ulElement.insertBefore(element, targetElement);
|
|
4221
4233
|
}
|
|
4222
4234
|
};
|
|
4235
|
+
/**
|
|
4236
|
+
* Handles the UI change in vue for the list view.
|
|
4237
|
+
*
|
|
4238
|
+
* @param {DataSource} newData - The new data source for the list view.
|
|
4239
|
+
* @param {ElementContext} listElement - The HTML element context for the list view.
|
|
4240
|
+
* @param {Virtualization} virtualThis - The virtualization context for the list view.
|
|
4241
|
+
*/
|
|
4242
|
+
Virtualization.prototype.onVuechange = function (newData, listElement, virtualThis) {
|
|
4243
|
+
var liItem = ListBase.createListItemFromJson(virtualThis.listViewInstance.createElement,
|
|
4244
|
+
// eslint-disable-next-line
|
|
4245
|
+
[newData], virtualThis.listViewInstance.listBaseOption, null, null, virtualThis.listViewInstance);
|
|
4246
|
+
while (listElement.lastChild) {
|
|
4247
|
+
listElement.removeChild(listElement.lastChild);
|
|
4248
|
+
}
|
|
4249
|
+
listElement.appendChild(liItem[0].firstChild);
|
|
4250
|
+
};
|
|
4223
4251
|
Virtualization.prototype.onNgChange = function (newData, listElement, virtualThis) {
|
|
4224
4252
|
// compile given target element with template for new data
|
|
4225
4253
|
// eslint-disable-next-line
|
|
@@ -4471,7 +4499,7 @@ var Sortable = /** @__PURE__ @class */ (function (_super) {
|
|
|
4471
4499
|
_this.target = null;
|
|
4472
4500
|
_this.curTarget = null;
|
|
4473
4501
|
remove(e.helper);
|
|
4474
|
-
getComponent(_this.element,
|
|
4502
|
+
getComponent(_this.element, 'draggable').intDestroy(e.event);
|
|
4475
4503
|
};
|
|
4476
4504
|
_this.bind();
|
|
4477
4505
|
return _this;
|