@syncfusion/ej2-dropdowns 19.3.47 → 19.3.48
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 +8 -0
- package/dist/ej2-dropdowns.umd.min.js +2 -2
- package/dist/ej2-dropdowns.umd.min.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es2015.js +14 -22
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +14 -22
- package/dist/es6/ej2-dropdowns.es5.js.map +1 -1
- package/dist/global/ej2-dropdowns.min.js +2 -2
- package/dist/global/ej2-dropdowns.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +7 -7
- package/src/drop-down-tree/drop-down-tree.js +3 -4
- package/src/multi-select/multi-select.js +11 -18
|
@@ -4717,7 +4717,7 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
4717
4717
|
this.trigger('blur');
|
|
4718
4718
|
}
|
|
4719
4719
|
updateView() {
|
|
4720
|
-
if ((!this.showCheckBox && !this.allowMultiSelection) || this.mode === 'Custom') {
|
|
4720
|
+
if ((!this.showCheckBox && !this.allowMultiSelection) || this.mode === 'Custom' || this.inputFocus) {
|
|
4721
4721
|
return;
|
|
4722
4722
|
}
|
|
4723
4723
|
if (this.mode !== 'Box') {
|
|
@@ -5156,10 +5156,10 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
5156
5156
|
this.inputWrapper.insertBefore(this.chipWrapper, this.hiddenElement);
|
|
5157
5157
|
addClass([this.inputWrapper], SHOW_CHIP);
|
|
5158
5158
|
const isValid = this.getValidMode();
|
|
5159
|
-
if (isValid && this.value !== null) {
|
|
5159
|
+
if (isValid && this.value !== null && (this.value && this.value.length !== 0)) {
|
|
5160
5160
|
addClass([this.inputEle], CHIP_INPUT);
|
|
5161
5161
|
}
|
|
5162
|
-
else if (this.value === null) {
|
|
5162
|
+
else if (this.value === null || (this.value && this.value.length === 0)) {
|
|
5163
5163
|
addClass([this.chipWrapper], HIDEICON);
|
|
5164
5164
|
}
|
|
5165
5165
|
}
|
|
@@ -5431,7 +5431,6 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
5431
5431
|
else {
|
|
5432
5432
|
if (this.showCheckBox) {
|
|
5433
5433
|
this.treeObj.checkedNodes = this.value.slice();
|
|
5434
|
-
setValue('selectedNodes', [], this.treeObj);
|
|
5435
5434
|
this.treeObj.dataBind();
|
|
5436
5435
|
this.setMultiSelect();
|
|
5437
5436
|
}
|
|
@@ -11461,16 +11460,12 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
11461
11460
|
l10n = new L10n('dropdowns', l10nLocale, this.locale);
|
|
11462
11461
|
}
|
|
11463
11462
|
const remainContent = l10n.getConstant('overflowCountTemplate');
|
|
11463
|
+
const totalContent = l10n.getConstant('totalCountTemplate');
|
|
11464
11464
|
const raminElement = this.createElement('span', {
|
|
11465
11465
|
className: REMAIN_WRAPPER$1
|
|
11466
11466
|
});
|
|
11467
|
-
|
|
11468
|
-
|
|
11469
|
-
// eslint-disable-next-line
|
|
11470
|
-
let remainCompildTemp = compiledString({ 'count': this.value.length }, this, 'overflowCountTemplate', null, !this.isStringTemplate, null, raminElement);
|
|
11471
|
-
if (remainCompildTemp && remainCompildTemp.length > 0) {
|
|
11472
|
-
raminElement.appendChild(remainCompildTemp[0]);
|
|
11473
|
-
}
|
|
11467
|
+
let remainCompildTemp = remainContent.replace('${count}', this.value.length.toString());
|
|
11468
|
+
raminElement.innerText = remainCompildTemp;
|
|
11474
11469
|
this.viewWrapper.appendChild(raminElement);
|
|
11475
11470
|
this.renderReactTemplates();
|
|
11476
11471
|
const remainSize = raminElement.offsetWidth;
|
|
@@ -11522,9 +11517,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
11522
11517
|
}
|
|
11523
11518
|
if (remaining > 0) {
|
|
11524
11519
|
const totalWidth = overAllContainer - downIconWidth - this.clearIconWidth;
|
|
11525
|
-
this.viewWrapper.appendChild(this.updateRemainTemplate(raminElement, this.viewWrapper, remaining,
|
|
11520
|
+
this.viewWrapper.appendChild(this.updateRemainTemplate(raminElement, this.viewWrapper, remaining, remainContent, totalContent, totalWidth));
|
|
11526
11521
|
this.updateRemainWidth(this.viewWrapper, totalWidth);
|
|
11527
|
-
this.updateRemainingText(raminElement, downIconWidth, remaining,
|
|
11522
|
+
this.updateRemainingText(raminElement, downIconWidth, remaining, remainContent, totalContent);
|
|
11528
11523
|
}
|
|
11529
11524
|
}
|
|
11530
11525
|
else {
|
|
@@ -11544,17 +11539,14 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
11544
11539
|
viewWrapper.style.width = totalWidth + 'px';
|
|
11545
11540
|
}
|
|
11546
11541
|
}
|
|
11547
|
-
updateRemainTemplate(raminElement, viewWrapper, remaining,
|
|
11542
|
+
updateRemainTemplate(raminElement, viewWrapper, remaining, remainContent, totalContent, totalWidth) {
|
|
11548
11543
|
if (viewWrapper.firstChild && viewWrapper.firstChild.nodeType === 3 && viewWrapper.firstChild.nodeValue === '') {
|
|
11549
11544
|
viewWrapper.removeChild(viewWrapper.firstChild);
|
|
11550
11545
|
}
|
|
11551
11546
|
raminElement.innerHTML = '';
|
|
11552
|
-
|
|
11553
|
-
let
|
|
11554
|
-
|
|
11555
|
-
let totalTemp = totalCompiledString({ 'count': remaining }, this, 'totalCountTemplate', null, !this.isStringTemplate, null, raminElement);
|
|
11556
|
-
raminElement.appendChild((viewWrapper.firstChild && viewWrapper.firstChild.nodeType === 3) ?
|
|
11557
|
-
remainTemp && remainTemp[0] : totalTemp && totalTemp[0]);
|
|
11547
|
+
let remainTemp = remainContent.replace('${count}', remaining.toString());
|
|
11548
|
+
let totalTemp = totalContent.replace('${count}', remaining.toString());
|
|
11549
|
+
raminElement.innerText = (viewWrapper.firstChild && viewWrapper.firstChild.nodeType === 3) ? remainTemp : totalTemp;
|
|
11558
11550
|
if (viewWrapper.firstChild && viewWrapper.firstChild.nodeType === 3) {
|
|
11559
11551
|
viewWrapper.classList.remove(TOTAL_COUNT_WRAPPER$1);
|
|
11560
11552
|
}
|
|
@@ -11564,7 +11556,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
11564
11556
|
}
|
|
11565
11557
|
return raminElement;
|
|
11566
11558
|
}
|
|
11567
|
-
updateRemainingText(raminElement, downIconWidth, remaining,
|
|
11559
|
+
updateRemainingText(raminElement, downIconWidth, remaining, remainContent, totalContent) {
|
|
11568
11560
|
const overAllContainer = this.componentWrapper.offsetWidth -
|
|
11569
11561
|
parseInt(window.getComputedStyle(this.componentWrapper).paddingLeft, 10) -
|
|
11570
11562
|
parseInt(window.getComputedStyle(this.componentWrapper).paddingRight, 10);
|
|
@@ -11583,7 +11575,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
11583
11575
|
wrapperleng = this.viewWrapper.offsetWidth;
|
|
11584
11576
|
}
|
|
11585
11577
|
const totalWidth = overAllContainer - downIconWidth;
|
|
11586
|
-
this.updateRemainTemplate(raminElement, this.viewWrapper, remaining,
|
|
11578
|
+
this.updateRemainTemplate(raminElement, this.viewWrapper, remaining, remainContent, totalContent, totalWidth);
|
|
11587
11579
|
}
|
|
11588
11580
|
}
|
|
11589
11581
|
getOverflowVal(index) {
|