igniteui-angular 16.1.15 → 16.1.16

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.
@@ -10134,12 +10134,10 @@ class IgxButtonDirective extends DisplayDensityBase {
10134
10134
  */
10135
10135
  set selected(value) {
10136
10136
  if (this._selected !== value) {
10137
- if (!this._selected) {
10138
- this.buttonSelected.emit({
10139
- button: this
10140
- });
10141
- }
10142
10137
  this._selected = value;
10138
+ this.buttonSelected.emit({
10139
+ button: this
10140
+ });
10143
10141
  }
10144
10142
  }
10145
10143
  get selected() {
@@ -27351,7 +27349,7 @@ class IgxGridSelectionService {
27351
27349
  /** Returns all data in the grid, with applied filtering and sorting and without deleted rows. */
27352
27350
  get allData() {
27353
27351
  let allData;
27354
- if (this.isFilteringApplied() || this.grid.sortingExpressions.length) {
27352
+ if (this.isFilteringApplied() || this.grid.sortingExpressions.length || this.grid.groupingExpressions?.length) {
27355
27353
  allData = this.grid.pinnedRecordsCount ? this.grid._filteredSortedUnpinnedData : this.grid.filteredSortedData;
27356
27354
  }
27357
27355
  else {
@@ -29682,19 +29680,24 @@ class IgxButtonGroupComponent extends DisplayDensityBase {
29682
29680
  if (this.selectedIndexes.indexOf(index) === -1) {
29683
29681
  this.selectedIndexes.push(index);
29684
29682
  }
29685
- this._renderer.setAttribute(button.nativeElement, 'aria-pressed', 'true');
29686
- this._renderer.addClass(button.nativeElement, 'igx-button-group__item--selected');
29687
- const indexInViewButtons = this.viewButtons.toArray().indexOf(button);
29688
- if (indexInViewButtons !== -1) {
29689
- this.values[indexInViewButtons].selected = true;
29683
+ if (button.selected) {
29684
+ this._renderer.setAttribute(button.nativeElement, 'aria-pressed', 'true');
29685
+ this._renderer.addClass(button.nativeElement, 'igx-button-group__item--selected');
29686
+ const indexInViewButtons = this.viewButtons.toArray().indexOf(button);
29687
+ if (indexInViewButtons !== -1) {
29688
+ this.values[indexInViewButtons].selected = true;
29689
+ }
29690
+ // deselect other buttons if selectionMode is not multi
29691
+ if (this.selectionMode !== 'multi' && this.selectedIndexes.length > 1) {
29692
+ this.buttons.forEach((_, i) => {
29693
+ if (i !== index && this.selectedIndexes.indexOf(i) !== -1) {
29694
+ this.deselectButton(i);
29695
+ }
29696
+ });
29697
+ }
29690
29698
  }
29691
- // deselect other buttons if selectionMode is not multi
29692
- if (this.selectionMode !== 'multi' && this.selectedIndexes.length > 1) {
29693
- this.buttons.forEach((_, i) => {
29694
- if (i !== index && this.selectedIndexes.indexOf(i) !== -1) {
29695
- this.deselectButton(i);
29696
- }
29697
- });
29699
+ else {
29700
+ this.deselectButton(index);
29698
29701
  }
29699
29702
  }
29700
29703
  /**
@@ -78757,7 +78760,7 @@ class IgxTreeGridSelectionService extends IgxGridSelectionService {
78757
78760
  added, removed, event, cancel: false
78758
78761
  };
78759
78762
  this.calculateRowsNewSelectionState(args, !!this.grid.primaryKey);
78760
- args.newSelection = Array.from(this.allData.filter(r => this.rowsToBeSelected.has(this.grid.primaryKey ? r[this.grid.primaryKey] : r)));
78763
+ args.newSelection = Array.from(this.grid.gridAPI.get_all_data().filter(r => this.rowsToBeSelected.has(this.grid.primaryKey ? r[this.grid.primaryKey] : r)));
78761
78764
  // retrieve rows/parents/children which has been added/removed from the selection
78762
78765
  this.handleAddedAndRemovedArgs(args);
78763
78766
  this.grid.rowSelectionChanging.emit(args);