@syncfusion/ej2-dropdowns 33.1.46 → 33.1.47

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.
@@ -1567,12 +1567,25 @@ let DropDownBase = class DropDownBase extends Component {
1567
1567
  this.isPreventChange = this.isAngular && this.preventChange ? true : this.isPreventChange;
1568
1568
  let isReOrder = true;
1569
1569
  if (!this.virtualSelectAll) {
1570
+ let newQueryWhereCount;
1571
+ let queryWhereCount;
1570
1572
  const newQuery = query.clone();
1571
1573
  for (let queryElements = 0; queryElements < newQuery.queries.length; queryElements++) {
1572
1574
  if (newQuery.queries[queryElements].fn === 'onWhere') {
1573
1575
  isWhereExist = true;
1576
+ newQueryWhereCount++;
1574
1577
  }
1575
1578
  }
1579
+ for (let queryElements = 0; !isNullOrUndefined(this.query) &&
1580
+ queryElements < this.query.queries.length; queryElements++) {
1581
+ if (this.query.queries[queryElements].fn === 'onWhere') {
1582
+ isWhereExist = true;
1583
+ queryWhereCount++;
1584
+ }
1585
+ }
1586
+ if (queryWhereCount === newQueryWhereCount) {
1587
+ isWhereExist = false;
1588
+ }
1576
1589
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1577
1590
  if (this.isVirtualizationEnabled && (e.count !== 0 && e.count < (this.itemCount * 2))) {
1578
1591
  if (newQuery) {
@@ -8078,6 +8091,7 @@ let DropDownTree = class DropDownTree extends Component {
8078
8091
  this.filterDelayTime = 300;
8079
8092
  this.isClicked = false;
8080
8093
  this.documentClickContext = this.onDocumentClick.bind(this);
8094
+ this.windowResizeContext = this.windowResize.bind(this);
8081
8095
  // Specifies if the checkAll method has been called
8082
8096
  this.isCheckAllCalled = false;
8083
8097
  this.isFromFilterChange = false;
@@ -8558,7 +8572,7 @@ let DropDownTree = class DropDownTree extends Component {
8558
8572
  EventHandler.add(this.inputWrapper, 'mousemove', this.mouseIn, this);
8559
8573
  EventHandler.add(this.inputWrapper, 'mouseout', this.onMouseLeave, this);
8560
8574
  EventHandler.add(this.overAllClear, 'mousedown', this.clearAll, this);
8561
- EventHandler.add(window, 'resize', this.windowResize, this);
8575
+ EventHandler.add(window, 'resize', this.windowResizeContext);
8562
8576
  const formElement = closest(this.inputWrapper, 'form');
8563
8577
  if (formElement) {
8564
8578
  EventHandler.add(formElement, 'reset', this.resetValueHandler, this);
@@ -8594,7 +8608,7 @@ let DropDownTree = class DropDownTree extends Component {
8594
8608
  EventHandler.remove(this.inputWrapper, 'mousemove', this.mouseIn);
8595
8609
  EventHandler.remove(this.inputWrapper, 'mouseout', this.onMouseLeave);
8596
8610
  EventHandler.remove(this.overAllClear, 'mousedown', this.clearAll);
8597
- EventHandler.remove(window, 'resize', this.windowResize);
8611
+ EventHandler.remove(window, 'resize', this.windowResizeContext);
8598
8612
  const formElement = closest(this.inputWrapper, 'form');
8599
8613
  if (formElement) {
8600
8614
  EventHandler.remove(formElement, 'reset', this.resetValueHandler);
@@ -23829,6 +23843,12 @@ let Mention = class Mention extends DropDownBase {
23829
23843
  }
23830
23844
  }
23831
23845
  const currentRange = this.getTextRange();
23846
+ // Pre-flight guard: close popup if mention character is no longer present
23847
+ if (this.isPopupOpen && currentRange !== undefined && currentRange.indexOf(this.mentionChar) === -1) {
23848
+ this.queryString = '';
23849
+ this.hidePopup();
23850
+ return;
23851
+ }
23832
23852
  // eslint-disable-next-line security/detect-non-literal-regexp
23833
23853
  const mentionRegex = new RegExp(this.mentionChar.replace(/[.*+?^${}()|[\]\\]/g, '\\$&') + '\\s');
23834
23854
  const isValid = currentRange && mentionRegex.test(currentRange) ? false : true;