diff --git a/live-editing/configs/DropDownConfigGenerator.ts b/live-editing/configs/DropDownConfigGenerator.ts index 7a267be497..7608d92565 100644 --- a/live-editing/configs/DropDownConfigGenerator.ts +++ b/live-editing/configs/DropDownConfigGenerator.ts @@ -142,9 +142,9 @@ export class DropDownConfigGenerator implements IConfigGenerator { component: 'DropdownTreeGridHierarchicalSelectionComponent', appModuleConfig: new AppModuleConfig({ imports: ['IgxDropDownModule', 'DropdownTreeGridHierarchicalSelectionComponent', - 'IgxButtonModule', 'IgxToggleModule', 'IgxTreeGridModule', 'IgxChipsModule'], + 'IgxButtonModule', 'IgxToggleModule', 'IgxTreeGridModule', 'IgxChipsModule', 'IgxIconModule'], ngDeclarations: ['DropdownTreeGridHierarchicalSelectionComponent'], - ngImports: ['IgxDropDownModule', 'IgxButtonModule', 'IgxToggleModule', 'IgxTreeGridModule', 'IgxChipsModule'] + ngImports: ['IgxDropDownModule', 'IgxButtonModule', 'IgxToggleModule', 'IgxTreeGridModule', 'IgxChipsModule', 'IgxIconModule'] }), shortenComponentPathBy: '/data-entries/dropdown/' })); diff --git a/projects/app-lob/src/app/grid-dynamic-chart-data/data-analysis-dock-manager/data-analysis-dock-manager.component.html b/projects/app-lob/src/app/grid-dynamic-chart-data/data-analysis-dock-manager/data-analysis-dock-manager.component.html index c182f1723d..640dcebc51 100644 --- a/projects/app-lob/src/app/grid-dynamic-chart-data/data-analysis-dock-manager/data-analysis-dock-manager.component.html +++ b/projects/app-lob/src/app/grid-dynamic-chart-data/data-analysis-dock-manager/data-analysis-dock-manager.component.html @@ -1,6 +1,6 @@
- @@ -108,8 +108,8 @@
@@ -124,36 +124,3 @@ - - - - - - -
-
- CONDITIONAL FORMATTING -
-
- -
-
-
-
-
-
- - {{condition.replace('10', '10%')}} -
-
-
-
-
- - - Incompatible data - diff --git a/projects/app-lob/src/app/grid-dynamic-chart-data/data-analysis-dock-manager/data-analysis-dock-manager.component.ts b/projects/app-lob/src/app/grid-dynamic-chart-data/data-analysis-dock-manager/data-analysis-dock-manager.component.ts index 7a36c6ca09..eb66a9f9f3 100644 --- a/projects/app-lob/src/app/grid-dynamic-chart-data/data-analysis-dock-manager/data-analysis-dock-manager.component.ts +++ b/projects/app-lob/src/app/grid-dynamic-chart-data/data-analysis-dock-manager/data-analysis-dock-manager.component.ts @@ -1,46 +1,20 @@ /* eslint-disable max-len */ -import { AfterViewInit, ChangeDetectorRef, Component, ElementRef, Inject, OnInit, OnDestroy, Pipe, PipeTransform, QueryList, TemplateRef, ViewChild, ViewChildren } from '@angular/core'; -import { AutoPositionStrategy, CloseScrollStrategy, HorizontalAlignment, IColumnSelectionEventArgs, IgxDialogComponent, IgxGridComponent, IgxOverlayOutletDirective, IgxOverlayService, OverlayCancelableEventArgs, OverlayEventArgs, OverlaySettings, VerticalAlignment } from 'igniteui-angular'; +import { AfterViewInit, ChangeDetectorRef, Component, ElementRef, OnInit, Pipe, PipeTransform, QueryList, ViewChild, ViewChildren } from '@angular/core'; +import { IgxChartIntegrationDirective, OPTIONS_TYPE, CHART_TYPE } from 'igniteui-angular-extras'; import { IgcDockManagerLayout, IgcDockManagerPaneType, IgcSplitPane, IgcSplitPaneOrientation } from 'igniteui-dockmanager'; -import { ResizeObserver } from '@juggle/resize-observer'; -import { merge, noop, Subject } from 'rxjs'; -import { debounceTime, filter, takeUntil, tap } from 'rxjs/operators'; import { FinancialData } from '../../data/financialData'; import { FloatingPanesService } from '../../services/floating-panes.service'; -import { ChartIntegrationDirective, IDeterminedChartTypesArgs } from '../directives/chart-integration/chart-integration.directive'; -import { CHART_TYPE } from '../directives/chart-integration/chart-types'; -import { ConditionalFormattingDirective } from '../directives/conditional-formatting/conditional-formatting.directive'; import { DockSlotComponent } from './dock-slot/dock-slot.component'; -@Pipe({ - name: 'name' -}) -export class NamePipe implements PipeTransform { - public transform(name: string): string { - let res = ''; - const upperCaseChars = name.match(/[A-Z0-9]{1,}/g); - for (let index = 0; index < upperCaseChars.length; index++) { - if (!(index === upperCaseChars.length - 1)) { - res += name.substring(name.indexOf(upperCaseChars[index]), - name.indexOf(upperCaseChars[index + 1])) + ' '; - } else { - res += name.substring(name.indexOf(upperCaseChars[index])); - } - } - return res; - } -} - @Pipe({ name: 'filterType' }) export class FilterTypePipe implements PipeTransform { public transform(collection: CHART_TYPE[], type: string): CHART_TYPE[] { return collection.filter(types => types.indexOf(type) !== -1 && types.indexOf(type, type.length - 1) === -1); - } + } } - @Pipe({ name: 'hastDuplicateLayouts' }) @@ -78,61 +52,47 @@ export class HastDuplicateLayouts implements PipeTransform { styleUrls: ['./data-analysis-dock-manager.component.scss'], providers: [FloatingPanesService] }) -export class DataAnalysisDockManagerComponent implements OnInit, AfterViewInit, OnDestroy { +export class DataAnalysisDockManagerComponent implements OnInit, AfterViewInit { @ViewChild('dock', { read: ElementRef }) public dockManager: ElementRef; - @ViewChild(ConditionalFormattingDirective, { read: ConditionalFormattingDirective, static: true }) - public formatting: ConditionalFormattingDirective; - - @ViewChild(ChartIntegrationDirective, { read: ChartIntegrationDirective, static: true }) - public chartIntegration: ChartIntegrationDirective; - - @ViewChild('grid', { read: IgxGridComponent, static: true }) - public grid: IgxGridComponent; - - @ViewChild(IgxOverlayOutletDirective, { static: true }) - public outlet: IgxOverlayOutletDirective; - - @ViewChild('contextDialog', { static: true }) - public contextDialog: IgxDialogComponent; - - @ViewChild('dialogContent', { read: ElementRef }) - public dialogContent: ElementRef; + @ViewChild(IgxChartIntegrationDirective, { read: IgxChartIntegrationDirective, static: true }) + public chartIntegration: IgxChartIntegrationDirective; @ViewChildren(DockSlotComponent) public dockSlots: QueryList; - @ViewChild('template', { read: TemplateRef }) - public emptyChartTemplate: TemplateRef; - + public allCharts: CHART_TYPE[] = []; public data; public chartData = []; - public contextmenu = false; - public contextmenuX = 0; - public contextmenuY = 0; public selectedCharts = {}; - public range; - public currentFormatter; - public hasFormatter = false; public headersRenderButton = false; + public chartTypes = ['Column', 'Area', 'Bar', 'Line', 'Scatter', 'Pie']; - protected destroy$ = new Subject(); - private _contextDilogOverlaySettings: OverlaySettings = { - closeOnOutsideClick: false, - modal: false, - outlet: null, - scrollStrategy: new CloseScrollStrategy(), - positionStrategy: null - }; + constructor(private cdr: ChangeDetectorRef, private paneService: FloatingPanesService) { } + + public ngOnInit() { + this.data = FinancialData.generateData(1000); + } + + public ngAfterViewInit() { + this.allCharts = this.chartIntegration.getAvailableCharts(); + const pieChartOptions = { + labelsPosition: 4, + allowSliceExplosion: true, + sliceClick: (evt) => { evt.args.isExploded = !evt.args.isExploded; }, + formatLabel: (context) => `${context.percentValue.toFixed(2)}%` + }; + + this.chartIntegration.setChartComponentOptions(CHART_TYPE.PIE, OPTIONS_TYPE.CHART, pieChartOptions); + this.chartIntegration.getAvailableCharts() + .filter(chart => chart.indexOf('Scatter') === -1 || + chart.indexOf('Bar') === -1 || + chart !== CHART_TYPE.PIE) + .forEach(chart => this.chartIntegration.setChartComponentOptions(chart, OPTIONS_TYPE.X_AXIS, { labelAngle: 30 })); + } - private _esfOverlayId; - private rowIndex; - private colIndex; - private gridEventEmitters; - private gridResizeNotify = new Subject(); - private contentObserver: ResizeObserver; // eslint-disable-next-line @typescript-eslint/member-ordering public docLayout: IgcDockManagerLayout = { rootPane: { @@ -167,252 +127,15 @@ export class DataAnalysisDockManagerComponent implements OnInit, AfterViewInit, floatingPanes: [] }; - constructor(private cdr: ChangeDetectorRef, private paneService: FloatingPanesService, - @Inject(IgxOverlayService) private overlayService: IgxOverlayService) { - - } - - public ngOnInit() { - - this.data = FinancialData.generateData(1000); - this.gridResizeNotify.pipe(takeUntil(this.destroy$)) - .subscribe(() => { - if (this.contextmenu) { - this.disableContextMenu(); - } - if (this._esfOverlayId) { - this.overlayService.hide(this._esfOverlayId); - } - }); - this.grid.rangeSelected.pipe(tap(() => this.contextmenu ? this.disableContextMenu() : noop()), debounceTime(30)) - .subscribe(range => { - if (this._esfOverlayId) { - this.overlayService.hide(this._esfOverlayId); - } - // Clear column selection - this.grid.deselectAllColumns(); - if (this.grid.getSelectedRanges().length > 1) { - this.chartData = []; - } else { - this.chartData = this.grid.getSelectedData(); - } - - this.currentFormatter = undefined; - this.range = range; - this.renderButton(); - this.createChartCommonLogic(); - this.headersRenderButton = false; - }); - - this.grid.columnSelectionChanging.pipe(tap(() => this.contextmenu ? this.disableContextMenu() : noop()), debounceTime(100)) - .subscribe((args: IColumnSelectionEventArgs) => { - if (this._esfOverlayId) { - this.overlayService.hide(this._esfOverlayId); - } - // Clear range selection - this.grid.clearCellSelection(); - this.chartData = this.grid.getSelectedColumnsData(); - this.currentFormatter = undefined; - this.range = {}; - this.renderHeaderButton(); - this.createChartCommonLogic(); - this.headersRenderButton = true; - }); - - this.gridEventEmitters = merge(this.grid.filteringDone, - this.grid.sortingDone, - this.grid.columnMoving, - this.grid.columnPin, - this.grid.columnResized, - this.grid.columnMovingEnd, - this.grid.columnVisibilityChanged); - - this.gridEventEmitters.pipe(takeUntil(this.destroy$)).subscribe(() => { - if (this.grid.selectedCells.length > 0) { - this.grid.clearCellSelection(); - } - if (this.grid.selectedColumns().length > 0) { - this.grid.deselectAllColumns(); - } - if (this.contextmenu) { - this.disableContextMenu(); - this.range = undefined; - } - if (this.hasFormatter) { - this.clearFormatting(); - } - }); - - this.overlayService.opening.subscribe((evt: OverlayCancelableEventArgs) => { - if (evt.componentRef && evt.componentRef.instance && - (evt.componentRef.instance as any).className === 'igx-excel-filter') { - this.disableContextMenu(); - this._esfOverlayId = evt.id; - } - }); - - this.overlayService.closed.subscribe((evt: OverlayEventArgs) => { - if (evt.componentRef && - evt.componentRef.instance && - (evt.componentRef.instance as any).className === 'igx-excel-filter' && - evt.id === this._esfOverlayId) { - this._esfOverlayId = undefined; - } - }); - } - - public createChartCommonLogic() { - if (Object.keys(this.selectedCharts).length !== 0) { - setTimeout(() => { - Object.keys(this.selectedCharts).forEach((c: CHART_TYPE) => { - const chartHost = this.getChartHostFromSlot(c); - if (this.availableCharts.indexOf(c) !== -1) { - if (c !== CHART_TYPE.PIE && typeof this.selectedCharts[c] === 'object') { - this.selectedCharts[c] = this.chartIntegration.chartFactory(c, null, this.selectedCharts[c]); - } else { - chartHost.viewContainerRef.clear(); - this.selectedCharts[c] = this.chartIntegration.chartFactory(c, chartHost.viewContainerRef); - } - } else { - chartHost.viewContainerRef.clear(); - const embeddedView = chartHost.viewContainerRef.createEmbeddedView(this.emptyChartTemplate); - embeddedView.detectChanges(); - this.selectedCharts[c] = 'Empty'; - } - }); - }); - } - } - public getChartHostFromSlot(type: CHART_TYPE) { return this.dockSlots.find(s => s.id === type).chartHost; } - public ngAfterViewInit(): void { - this.contentObserver = new ResizeObserver(() => this.gridResizeNotify.next()); - this.contentObserver.observe(this.grid.nativeElement); - this.dialogContent.nativeElement.onpointerdown = event => event.stopPropagation(); - - this.allCharts = this.chartIntegration.getAllChartTypes(); - this.chartIntegration.chartTypesDetermined.subscribe((args: IDeterminedChartTypesArgs) => { - if (args.chartsAvailability.size === 0 || args.chartsForCreation.length === 0) { - this.chartIntegration.disableCharts(this.allCharts); - } else { - args.chartsAvailability.forEach((isAvailable, chart) => { - if (args.chartsForCreation.indexOf(chart) === -1) { - this.chartIntegration.disableCharts([chart]); - } else { - this.chartIntegration.enableCharts([chart]); - } - }); - } - this.availableCharts = this.chartIntegration.getAvailableCharts(); - }); - this.cdr.detectChanges(); - - this.formatting.formattersReady.pipe(takeUntil(this.destroy$)).subscribe(names => this.formattersNames = names); - this.grid.dataPreLoad.pipe( - tap(() => this.contextmenu ? this.disableContextMenu() : noop()), - debounceTime(250), - filter(() => this.range), - takeUntil(this.destroy$)) - .subscribe(() => !this.contextmenu ? (this.headersRenderButton ? this.renderHeaderButton() : this.renderButton()) : noop()); - this.grid.parentVirtDir.chunkLoad.pipe( - tap(() => this.contextmenu ? this.disableContextMenu() : noop()), - debounceTime(250), - filter(() => this.range), - takeUntil(this.destroy$)) - .subscribe(() => { - if (!this.contextmenu) { this.headersRenderButton ? this.renderHeaderButton() : this.renderButton(); } - }); - - this.grid.selected.pipe( - filter(() => this.range), - takeUntil(this.destroy$)) - .subscribe((args: any) => { - if (this.grid.selectedCells.length < 2 || args.expressions) { - this.range = undefined; - this.disableContextMenu(); - if (this._esfOverlayId) { - this.overlayService.hide(this._esfOverlayId); - } - this.cdr.detectChanges(); - } - }); - - window.onresize = () => { - const x = (this.dockManager.nativeElement.getBoundingClientRect().width / 3); - const y = (this.dockManager.nativeElement.getBoundingClientRect().height / 3); - this.paneService.initialPanePosition = { x, y }; - }; - - setTimeout(() => { - const x = (this.dockManager.nativeElement.getBoundingClientRect().width / 3); - const y = (this.dockManager.nativeElement.getBoundingClientRect().height / 3); - - this.paneService.initialPanePosition = { x, y }; - - const handler = (component) => { - const _this = component; - return { - deleteProperty(target, prop) { - if (target[prop].type) { - _this.paneService.removePane(target[prop]); - _this.cdr.detectChanges(); - } - return true; - } - }; - }; - this.dockManager.nativeElement.layout.floatingPanes = new Proxy(this.dockManager.nativeElement.layout.floatingPanes, handler(this)); - }, 1000); - } - - public ngOnDestroy(): void { - this.destroy$.next(true); - this.destroy$.complete(); - } - public formatCurrency(value: number) { return '$' + value.toFixed(3); } - /* eslint-disable @typescript-eslint/member-ordering */ - public chartTypesMenuX; - public chartTypesMenuY; - - public availableCharts: CHART_TYPE[] = []; - public allCharts: CHART_TYPE[] = []; - public chartTypes = ['Column', 'Area', 'Bar', 'Line', 'Scatter', 'Pie']; - - public toggleContextDialog(btn) { - if (!this.contextDialog.isOpen) { - this._contextDilogOverlaySettings.outlet = this.outlet; - const positionStrategy = { - verticalStartPoint: VerticalAlignment.Bottom, - target: btn, - openAnimation: null, - closeAnimation: null - }; - - if (((this.grid.visibleColumns.length - 1) - this.colIndex) < 2 || !this.grid.navigation.isColumnFullyVisible(this.colIndex + 1)) { - positionStrategy['horizontalDirection'] = HorizontalAlignment.Left; - positionStrategy['horizontalStartPoint'] = HorizontalAlignment.Right; - } else { - positionStrategy['horizontalDirection'] = HorizontalAlignment.Center; - positionStrategy['horizontalStartPoint'] = HorizontalAlignment.Center; - } - this._contextDilogOverlaySettings.positionStrategy = new AutoPositionStrategy({ ...positionStrategy }); - this.contextDialog.open(this._contextDilogOverlaySettings); - } else { - this.contextDialog.close(); - } - } - - public formattersNames = []; - public createChart(type: CHART_TYPE) { - const floatingPane: IgcSplitPane = { type: IgcDockManagerPaneType.splitPane, orientation: IgcSplitPaneOrientation.horizontal, @@ -435,6 +158,7 @@ export class DataAnalysisDockManagerComponent implements OnInit, AfterViewInit, this.paneService.appendPane(splitPane); const chartHost = this.getChartHostFromSlot(type); chartHost.viewContainerRef.clear(); + this.chartIntegration.chartFactory const chart = this.chartIntegration.chartFactory(type, chartHost.viewContainerRef); this.dockManager.nativeElement.layout.floatingPanes.push(splitPane); @@ -442,91 +166,4 @@ export class DataAnalysisDockManagerComponent implements OnInit, AfterViewInit, this.selectedCharts[type] = chart; this.cdr.detectChanges(); } - - public disableContextMenu() { - this.contextmenu = false; - this.contextDialog.close(); - } - - public analyse(condition) { - this.currentFormatter = condition; - this.hasFormatter = true; - this.formatting.formatCells(condition); - } - - public clearFormatting() { - this.formatting.clearFormatting(); - this.hasFormatter = false; - this.currentFormatter = undefined; - } - - private renderButton() { - this.rowIndex = this.range.rowEnd; - this.colIndex = this.range.columnEnd; - - while (this.colIndex >= 0 && !this.grid.navigation.isColumnFullyVisible(this.colIndex)) { - this.colIndex--; - } - - if (this.colIndex < 0) { - return; - } - - let cell; - if ((!this.grid.getRowByIndex(this.rowIndex) || (this.rowIndex >= this.grid.rowList.length - 2) && this.rowIndex + 2 < this.grid.dataLength)) { - const lastFullyVisibleRowIndex = this.grid.rowList.toArray()[this.grid.rowList.length - 3].index; - const field = this.grid.visibleColumns[this.colIndex].field; - cell = this.grid.gridAPI.get_cell_by_index(lastFullyVisibleRowIndex, field); - } else { - cell = this.grid.gridAPI.get_cell_by_index(this.rowIndex, this.grid.visibleColumns[this.colIndex].field); - } - - if (!cell) { - return; - } - this.contextmenuX = cell.element.nativeElement.getClientRects()[0].right; - this.contextmenuY = cell.element.nativeElement.getClientRects()[0].bottom; - this.contextmenu = this.isWithInRange(cell.rowIndex, cell.visibleColumnIndex); - this.cdr.detectChanges(); - } - - private renderHeaderButton() { - const selectedColumns = this.grid.selectedColumns(); - if (selectedColumns.length === 0) { - return; - } - - const selectedColumnsIndexes = selectedColumns.map(c => c.visibleIndex).sort((a, b) => a - b); - this.colIndex = selectedColumnsIndexes[selectedColumnsIndexes.length - 1]; - this.rowIndex = undefined; - - while (selectedColumnsIndexes.length) { - if (this.grid.navigation.isColumnFullyVisible(this.colIndex)) { - break; - } - selectedColumnsIndexes.pop(); - this.colIndex = selectedColumnsIndexes[selectedColumnsIndexes.length - 1]; - } - - if (!selectedColumnsIndexes.length) { - return; - } - - const col = selectedColumns.find(c => c.visibleIndex === this.colIndex); - - if (!col) { - return; - } - - const headerCell = col.headerCell.nativeElement; - this.contextmenuX = headerCell.getClientRects()[0].right; - this.contextmenuY = headerCell.getClientRects()[0].bottom; - this.contextmenu = true; - this.cdr.detectChanges(); - } - - public isWithInRange(rowIndex, colIndex) { - return rowIndex >= this.range.rowStart && rowIndex <= this.range.rowEnd - && colIndex >= this.range.columnStart && colIndex <= this.range.columnEnd; - } } diff --git a/projects/app-lob/src/app/grid-dynamic-chart-data/grid-dynamic-chart-data.module.ts b/projects/app-lob/src/app/grid-dynamic-chart-data/grid-dynamic-chart-data.module.ts index bd826a0f31..a2328e10dc 100644 --- a/projects/app-lob/src/app/grid-dynamic-chart-data/grid-dynamic-chart-data.module.ts +++ b/projects/app-lob/src/app/grid-dynamic-chart-data/grid-dynamic-chart-data.module.ts @@ -9,7 +9,7 @@ import { IgxBarSeriesModule, IgxCategoryChartModule, IgxCategoryXAxisModule, IgxLegendModule, IgxNumericXAxisModule, IgxNumericYAxisModule, IgxPieChartModule } from 'igniteui-angular-charts'; import { IgxPreventDocumentScrollModule } from '../../../../../src/app/directives/prevent-scroll.directive'; -import { DataAnalysisDockManagerComponent, FilterTypePipe, HastDuplicateLayouts, NamePipe } from './data-analysis-dock-manager/data-analysis-dock-manager.component'; +import { DataAnalysisDockManagerComponent, HastDuplicateLayouts, FilterTypePipe } from './data-analysis-dock-manager/data-analysis-dock-manager.component'; import { DockSlotComponent } from './data-analysis-dock-manager/dock-slot/dock-slot.component'; import { ChartHostDirective, ChartIntegrationDirective } from './directives/chart-integration/chart-integration.directive'; import { ConditionalFormattingDirective } from './directives/conditional-formatting/conditional-formatting.directive'; @@ -23,7 +23,6 @@ import { CommonModule } from '@angular/common'; ChartHostDirective, ConditionalFormattingDirective, ChartIntegrationDirective, - NamePipe, FilterTypePipe, DataAnalysisDockManagerComponent, DockSlotComponent, diff --git a/src/app/data-entries/dropdown/dropdown-tree-grid-hierarchical-selection/dropdown-tree-grid-hierarchical-selection.component.ts b/src/app/data-entries/dropdown/dropdown-tree-grid-hierarchical-selection/dropdown-tree-grid-hierarchical-selection.component.ts index b9c1b557a7..85d0a7d7b7 100644 --- a/src/app/data-entries/dropdown/dropdown-tree-grid-hierarchical-selection/dropdown-tree-grid-hierarchical-selection.component.ts +++ b/src/app/data-entries/dropdown/dropdown-tree-grid-hierarchical-selection/dropdown-tree-grid-hierarchical-selection.component.ts @@ -25,7 +25,7 @@ export class DropdownTreeGridHierarchicalSelectionComponent implements OnInit { public onRowSelectionChanging(args: IRowSelectionEventArgs, grid: IgxTreeGridComponent) { this.selectedRows = []; - args.newSelection.forEach((val) => this.selectedRows.push(grid.getRowData(val))); + args.newSelection.forEach((val) => this.selectedRows.push(grid.getRowData(val.ID))); } public chipRemoved(event: IBaseChipEventArgs) { diff --git a/src/app/grid/grid-conditional-row-selectors/grid-conditional-row-selectors-sample.component.html b/src/app/grid/grid-conditional-row-selectors/grid-conditional-row-selectors-sample.component.html index 133c3b6342..25b5713d56 100644 --- a/src/app/grid/grid-conditional-row-selectors/grid-conditional-row-selectors-sample.component.html +++ b/src/app/grid/grid-conditional-row-selectors/grid-conditional-row-selectors-sample.component.html @@ -10,7 +10,7 @@
diff --git a/src/app/grid/grid-conditional-row-selectors/grid-conditional-row-selectors-sample.component.ts b/src/app/grid/grid-conditional-row-selectors/grid-conditional-row-selectors-sample.component.ts index 32a232bc7c..53a5b0fab3 100644 --- a/src/app/grid/grid-conditional-row-selectors/grid-conditional-row-selectors-sample.component.ts +++ b/src/app/grid/grid-conditional-row-selectors/grid-conditional-row-selectors-sample.component.ts @@ -31,7 +31,7 @@ export class GridConditionalRowSelectorsComponent { const originalAddedLength = event.added.length; // update selection to contain only allowed rows - event.newSelection = event.newSelection.filter(x => this.isSelectionAllowed(x)); + event.newSelection = event.newSelection.filter(x => this.isSelectionAllowed(x.ID)); // cleanup selection if all conditionally selectable rows are already selected if (event.newSelection.length diff --git a/src/app/hierarchical-grid/hierarchical-grid-conditional-row-selectors/hierarchical-grid-conditional-row-selectors.component.html b/src/app/hierarchical-grid/hierarchical-grid-conditional-row-selectors/hierarchical-grid-conditional-row-selectors.component.html index 2b1133b007..2f13d20de6 100644 --- a/src/app/hierarchical-grid/hierarchical-grid-conditional-row-selectors/hierarchical-grid-conditional-row-selectors.component.html +++ b/src/app/hierarchical-grid/hierarchical-grid-conditional-row-selectors/hierarchical-grid-conditional-row-selectors.component.html @@ -30,7 +30,7 @@
diff --git a/src/app/hierarchical-grid/hierarchical-grid-conditional-row-selectors/hierarchical-grid-conditional-row-selectors.component.ts b/src/app/hierarchical-grid/hierarchical-grid-conditional-row-selectors/hierarchical-grid-conditional-row-selectors.component.ts index 0a5ebe1356..8094665d39 100644 --- a/src/app/hierarchical-grid/hierarchical-grid-conditional-row-selectors/hierarchical-grid-conditional-row-selectors.component.ts +++ b/src/app/hierarchical-grid/hierarchical-grid-conditional-row-selectors/hierarchical-grid-conditional-row-selectors.component.ts @@ -30,7 +30,7 @@ export class HGridConditionalRowSelectorsComponent implements OnInit { const originalAddedLength = event.added.length; // update selection to contain only allowed rows - event.newSelection = event.newSelection.filter(x => this.isSelectionAllowed(x)); + event.newSelection = event.newSelection.filter(x => this.isSelectionAllowed(x.Artist)); // cleanup selection if all conditionally selectable rows are already selected if (event.newSelection.length diff --git a/src/app/tree-grid/tree-grid-conditional-row-selectors/tree-grid-conditional-row-selectors.component.html b/src/app/tree-grid/tree-grid-conditional-row-selectors/tree-grid-conditional-row-selectors.component.html index a4ecb6d0fc..2bf788f57f 100644 --- a/src/app/tree-grid/tree-grid-conditional-row-selectors/tree-grid-conditional-row-selectors.component.html +++ b/src/app/tree-grid/tree-grid-conditional-row-selectors/tree-grid-conditional-row-selectors.component.html @@ -11,7 +11,7 @@
diff --git a/src/app/tree-grid/tree-grid-conditional-row-selectors/tree-grid-conditional-row-selectors.component.ts b/src/app/tree-grid/tree-grid-conditional-row-selectors/tree-grid-conditional-row-selectors.component.ts index a08f22b4c6..75d4dfd8fa 100644 --- a/src/app/tree-grid/tree-grid-conditional-row-selectors/tree-grid-conditional-row-selectors.component.ts +++ b/src/app/tree-grid/tree-grid-conditional-row-selectors/tree-grid-conditional-row-selectors.component.ts @@ -29,7 +29,7 @@ export class TreeGridConditionalRowSelectorsSampleComponent implements OnInit { const originalAddedLength = event.added.length; // update selection to contain only allowed rows - event.newSelection = event.newSelection.filter(x => this.isSelectionAllowed(x)); + event.newSelection = event.newSelection.filter(x => this.isSelectionAllowed(x.ID)); // cleanup selection if all conditionally selectable rows are already selected if (event.newSelection.length