igniteui-angular 19.0.8 → 19.0.9

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.
@@ -8572,6 +8572,11 @@ const IgxButtonType = /*@__PURE__*/ mkenum({
8572
8572
  * ```
8573
8573
  */
8574
8574
  class IgxButtonDirective extends IgxButtonBaseDirective {
8575
+ emitSelected() {
8576
+ this.buttonSelected.emit({
8577
+ button: this
8578
+ });
8579
+ }
8575
8580
  /**
8576
8581
  * Gets or sets whether the button is selected.
8577
8582
  * Mainly used in the IgxButtonGroup component and it will have no effect if set separately.
@@ -8610,11 +8615,10 @@ class IgxButtonDirective extends IgxButtonBaseDirective {
8610
8615
  this._selected = false;
8611
8616
  }
8612
8617
  ngAfterContentInit() {
8613
- this.nativeElement.addEventListener('click', () => {
8614
- this.buttonSelected.emit({
8615
- button: this
8616
- });
8617
- });
8618
+ this.nativeElement.addEventListener('click', this.emitSelected.bind(this));
8619
+ }
8620
+ ngOnDestroy() {
8621
+ this.nativeElement.removeEventListener('click', this.emitSelected);
8618
8622
  }
8619
8623
  /**
8620
8624
  * Sets the type of the button.
@@ -10405,13 +10409,13 @@ class IgxInputGroupComponent {
10405
10409
  this._filled = false;
10406
10410
  this._resourceStrings = getCurrentResourceStrings(InputResourceStringsEN);
10407
10411
  this._theme = this.themeToken.theme;
10408
- const { unsubscribe } = this.themeToken.onChange((theme) => {
10412
+ const themeChange = this.themeToken.onChange((theme) => {
10409
10413
  if (this._theme !== theme) {
10410
10414
  this._theme = theme;
10411
10415
  this.cdr.detectChanges();
10412
10416
  }
10413
10417
  });
10414
- this._destroyRef.onDestroy(() => unsubscribe);
10418
+ this._destroyRef.onDestroy(() => themeChange.unsubscribe());
10415
10419
  }
10416
10420
  /** @hidden */
10417
10421
  onClick(event) {
@@ -25307,10 +25311,12 @@ class IgxGridCRUDService extends IgxRowAddCrudState {
25307
25311
  return;
25308
25312
  }
25309
25313
  this.endEdit(true, event);
25310
- if (parentRow != null && this.grid.expansionStates.get(parentRow.key)) {
25311
- this.grid.collapseRow(parentRow.key);
25314
+ // work with copy of original row, since context may change on collapse.
25315
+ const parentRowCopy = parentRow ? Object.assign(copyDescriptors(parentRow), parentRow) : null;
25316
+ if (parentRowCopy != null && this.grid.expansionStates.get(parentRowCopy.key)) {
25317
+ this.grid.collapseRow(parentRowCopy.key);
25312
25318
  }
25313
- this.createAddRow(parentRow, asChild);
25319
+ this.createAddRow(parentRowCopy, asChild);
25314
25320
  this.grid.transactions.startPending();
25315
25321
  if (this.addRowParent.isPinned) {
25316
25322
  // If parent is pinned, add the new row to pinned records