@syncfusion/ej2-dropdowns 33.2.7 → 33.2.8

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.
@@ -4754,6 +4754,9 @@ let DropDownList = class DropDownList extends DropDownBase {
4754
4754
  (this.previousValue != null && this.isObjectInArray(this.previousValue, [this.allowCustom &&
4755
4755
  this.isObjectCustomValue ? this.value ? this.value : dataItem : dataItem.value ?
4756
4756
  this.getDataByValue(dataItem.value) : dataItem])))) {
4757
+ if (this.getModuleName() === 'combobox' && this.autoFill && e && (e.type === 'click' || e.action === 'enter')) {
4758
+ return false;
4759
+ }
4757
4760
  this.isSelected = false;
4758
4761
  return true;
4759
4762
  }
@@ -14433,8 +14436,12 @@ let MultiSelect = class MultiSelect extends DropDownBase {
14433
14436
  window.crypto.getRandomValues(array);
14434
14437
  return array[0] / (0xFFFFFFFF + 1);
14435
14438
  }
14439
+ isInvalidString(value) {
14440
+ return !value || value.trim().length === 0;
14441
+ }
14436
14442
  checkForCustomValue(query, fields) {
14437
- const dataChecks = !this.getValueByText(this.inputElement.value, this.ignoreCase);
14443
+ const dataChecks = !this.getValueByText(this.inputElement.value, this.ignoreCase) &&
14444
+ !this.isInvalidString(this.inputElement.value);
14438
14445
  const field = fields ? fields : this.fields;
14439
14446
  this.isCustomReset = true;
14440
14447
  if (this.allowCustomValue && dataChecks) {
@@ -18081,12 +18088,24 @@ let MultiSelect = class MultiSelect extends DropDownBase {
18081
18088
  temp = this.viewWrapper.innerHTML;
18082
18089
  this.updateWrapperText(this.viewWrapper, data);
18083
18090
  }
18091
+ let display;
18092
+ let topElement;
18093
+ if (this.componentWrapper.offsetWidth === 0 && this.componentWrapper.parentElement) {
18094
+ topElement = this.componentWrapper.parentElement.parentElement;
18095
+ if (!isNullOrUndefined(topElement) && topElement.style.display === 'none') {
18096
+ display = topElement.style.display;
18097
+ topElement.style.display = 'block';
18098
+ }
18099
+ }
18084
18100
  wrapperleng = this.viewWrapper.offsetWidth +
18085
18101
  parseInt(window.getComputedStyle(this.viewWrapper).paddingRight, 10) +
18086
18102
  parseInt(window.getComputedStyle(this.viewWrapper).paddingLeft, 10);
18087
18103
  overAllContainer = this.componentWrapper.offsetWidth -
18088
18104
  parseInt(window.getComputedStyle(this.componentWrapper).paddingLeft, 10) -
18089
18105
  parseInt(window.getComputedStyle(this.componentWrapper).paddingRight, 10);
18106
+ if (!isNullOrUndefined(display) && display === 'none' && !isNullOrUndefined(topElement)) {
18107
+ topElement.style.display = 'none';
18108
+ }
18090
18109
  if ((wrapperleng + downIconWidth + this.clearIconWidth) > overAllContainer) {
18091
18110
  if (tempData !== undefined && tempData !== '') {
18092
18111
  temp = tempData;
@@ -24056,8 +24075,12 @@ let Mention = class Mention extends DropDownBase {
24056
24075
  ? lastWordRange.substring(lastWordRange.lastIndexOf(this.mentionChar) + 1).trim()
24057
24076
  : lastWordRange.replace(this.mentionChar, '');
24058
24077
  }
24078
+ if (this.queryString !== '' && e.keyCode === 8 && lastWordRange.includes(this.mentionChar) && !this.isPopupOpen &&
24079
+ ((typeof this.displayTemplate === 'function' ? this.displayTemplate() : this.displayTemplate)).includes(this.mentionChar)) {
24080
+ this.queryString = '';
24081
+ }
24059
24082
  if (this.mentionChar.charCodeAt(0) === lastWordRange.charCodeAt(0) &&
24060
- this.queryString !== '' && e.keyCode !== 38 && e.keyCode !== 40 && e.keyCode !== 8 && !this.lineBreak) {
24083
+ this.queryString !== '' && e.keyCode !== 38 && e.keyCode !== 40 && !this.lineBreak) {
24061
24084
  this.searchLists(e);
24062
24085
  if (!this.isPopupOpen && this.queryString.length >= this.minLength) {
24063
24086
  if (!this.isContentEditable(this.inputElement)) {