@@ -610,15 +610,15 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
610
610
public dragRowID = null ;
611
611
612
612
613
- /**
614
- * Gets/Sets whether the rows are editable.
615
- * @remarks
616
- * By default it is set to false.
617
- * @example
618
- * ```html
619
- * <igx-grid #grid [showToolbar]="true" [rowEditable]="true" [primaryKey]="'ProductID'" [columnHiding]="true"></igx-grid>
620
- * ```
621
- */
613
+ /**
614
+ * Gets/Sets whether the rows are editable.
615
+ * @remarks
616
+ * By default it is set to false.
617
+ * @example
618
+ * ```html
619
+ * <igx-grid #grid [showToolbar]="true" [rowEditable]="true" [primaryKey]="'ProductID'" [columnHiding]="true"></igx-grid>
620
+ * ```
621
+ */
622
622
@WatchChanges ( )
623
623
@Input ( )
624
624
get rowEditable ( ) : boolean {
@@ -1096,13 +1096,13 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
1096
1096
@Output ( )
1097
1097
public onRowSelectionChange = new EventEmitter < IRowSelectionEventArgs > ( ) ;
1098
1098
1099
- /**
1100
- * Emitted when `IgxColumnComponent` is selected.
1101
- * @example
1102
- * ```html
1103
- * <igx-grid #grid (onColumnSelectionChange)="onColumnSelectionChange($event)" [data]="localData" [autoGenerate]="true"></igx-grid>
1104
- * ```
1105
- */
1099
+ /**
1100
+ * Emitted when `IgxColumnComponent` is selected.
1101
+ * @example
1102
+ * ```html
1103
+ * <igx-grid #grid (onColumnSelectionChange)="onColumnSelectionChange($event)" [data]="localData" [autoGenerate]="true"></igx-grid>
1104
+ * ```
1105
+ */
1106
1106
@Output ( )
1107
1107
public onColumnSelectionChange = new EventEmitter < IColumnSelectionEventArgs > ( ) ;
1108
1108
@@ -2634,6 +2634,11 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
2634
2634
positionStrategy : this . rowEditPositioningStrategy
2635
2635
} ;
2636
2636
2637
+ /**
2638
+ * @hidden @internal
2639
+ */
2640
+ public paginatorSettings : OverlaySettings = null ;
2641
+
2637
2642
private verticalScrollHandler = ( event ) => {
2638
2643
this . verticalScrollContainer . onScroll ( event ) ;
2639
2644
this . disableTransitions = true ;
@@ -2869,7 +2874,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
2869
2874
this . notifyChanges ( ) ;
2870
2875
} ) ;
2871
2876
2872
- this . resizeNotify . pipe ( destructor , filter ( ( ) => ! this . _init ) , throttleTime ( 100 , undefined , { leading : true , trailing : true } ) )
2877
+ this . resizeNotify . pipe ( destructor , filter ( ( ) => ! this . _init ) , throttleTime ( 100 , undefined , { leading : true , trailing : true } ) )
2873
2878
. subscribe ( ( ) => {
2874
2879
this . zone . run ( ( ) => {
2875
2880
this . notifyChanges ( true ) ;
@@ -3006,9 +3011,9 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
3006
3011
public setFilteredData ( data , pinned : boolean ) {
3007
3012
if ( this . hasPinnedRecords && pinned ) {
3008
3013
this . _filteredPinnedData = data || [ ] ;
3009
- const filteredUnpinned = this . _filteredUnpinnedData || [ ] ;
3010
- const filteredData = [ ... this . _filteredPinnedData , ... filteredUnpinned ] ;
3011
- this . filteredData = filteredData . length > 0 ? filteredData : this . _filteredUnpinnedData ;
3014
+ const filteredUnpinned = this . _filteredUnpinnedData || [ ] ;
3015
+ const filteredData = [ ... this . _filteredPinnedData , ...filteredUnpinned ] ;
3016
+ this . filteredData = filteredData . length > 0 ? filteredData : this . _filteredUnpinnedData ;
3012
3017
} else if ( this . hasPinnedRecords && ! pinned ) {
3013
3018
this . _filteredUnpinnedData = data ;
3014
3019
} else {
@@ -3069,7 +3074,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
3069
3074
this . _filteredSortedPinnedData = data ;
3070
3075
this . pinnedRecords = data ;
3071
3076
this . _filteredSortedData = this . isRowPinningToTop ? [ ... this . _filteredSortedPinnedData , ... this . _filteredSortedUnpinnedData ] :
3072
- [ ... this . _filteredSortedUnpinnedData , ... this . _filteredSortedPinnedData ] ;
3077
+ [ ... this . _filteredSortedUnpinnedData , ... this . _filteredSortedPinnedData ] ;
3073
3078
this . refreshSearch ( true , false ) ;
3074
3079
} else if ( this . pinnedRecordsCount > 0 && ! pinned ) {
3075
3080
this . _filteredSortedUnpinnedData = data ;
@@ -3121,14 +3126,16 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
3121
3126
this . _setupRowObservers ( ) ;
3122
3127
this . _zoneBegoneListeners ( ) ;
3123
3128
3129
+ this . paginatorSettings = { outlet : this . outlet } ;
3130
+
3124
3131
const vertScrDC = this . verticalScrollContainer . displayContainer ;
3125
3132
vertScrDC . addEventListener ( 'scroll' , this . preventContainerScroll ) ;
3126
3133
3127
3134
this . _pinnedRowList . changes
3128
- . pipe ( takeUntil ( this . destroy$ ) )
3129
- . subscribe ( ( change : QueryList < IgxGridRowComponent > ) => {
3130
- this . onPinnedRowsChanged ( change ) ;
3131
- } ) ;
3135
+ . pipe ( takeUntil ( this . destroy$ ) )
3136
+ . subscribe ( ( change : QueryList < IgxGridRowComponent > ) => {
3137
+ this . onPinnedRowsChanged ( change ) ;
3138
+ } ) ;
3132
3139
}
3133
3140
3134
3141
/**
@@ -3826,7 +3833,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
3826
3833
'DropPosition.None is deprecated.' +
3827
3834
'Use DropPosition.AfterDropTarget instead.' ,
3828
3835
warningShown ) ;
3829
- position = DropPosition . AfterDropTarget ;
3836
+ position = DropPosition . AfterDropTarget ;
3830
3837
}
3831
3838
if ( ( column . level !== dropTarget . level ) ||
3832
3839
( column . topLevelParent !== dropTarget . topLevelParent ) ) {
@@ -4276,7 +4283,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
4276
4283
* @param rowID The row id - primaryKey value or the data record instance.
4277
4284
*/
4278
4285
public unpinRow ( rowID : any ) {
4279
- const index = this . _pinnedRecordIDs . indexOf ( rowID ) ;
4286
+ const index = this . _pinnedRecordIDs . indexOf ( rowID ) ;
4280
4287
if ( index === - 1 ) {
4281
4288
return false ;
4282
4289
}
@@ -4876,7 +4883,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
4876
4883
const diff = this . rowListDiffer . diff ( change ) ;
4877
4884
if ( diff ) {
4878
4885
this . notifyChanges ( true ) ;
4879
- }
4886
+ }
4880
4887
}
4881
4888
4882
4889
/**
@@ -5172,7 +5179,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
5172
5179
*/
5173
5180
protected reinitPinStates ( ) {
5174
5181
this . _pinnedColumns = this . columnList
5175
- . filter ( ( c ) => c . pinned ) . sort ( ( a , b ) => this . _pinnedColumns . indexOf ( a ) - this . _pinnedColumns . indexOf ( b ) ) ;
5182
+ . filter ( ( c ) => c . pinned ) . sort ( ( a , b ) => this . _pinnedColumns . indexOf ( a ) - this . _pinnedColumns . indexOf ( b ) ) ;
5176
5183
this . _unpinnedColumns = this . hasColumnGroups ? this . columnList . filter ( ( c ) => ! c . pinned ) :
5177
5184
this . columnList . filter ( ( c ) => ! c . pinned )
5178
5185
. sort ( ( a , b ) => this . _unpinnedColumns . indexOf ( a ) - this . _unpinnedColumns . indexOf ( b ) ) ;
@@ -5498,14 +5505,14 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
5498
5505
return this . extractDataFromSelection ( source , formatters , headers ) ;
5499
5506
}
5500
5507
5501
- /**
5502
- * Get current selected columns.
5503
- * @example
5504
- * Returns an array with selected columns
5505
- * ```typescript
5506
- * const selectedColumns = this.grid.selectedColumns();
5507
- * ```
5508
- */
5508
+ /**
5509
+ * Get current selected columns.
5510
+ * @example
5511
+ * Returns an array with selected columns
5512
+ * ```typescript
5513
+ * const selectedColumns = this.grid.selectedColumns();
5514
+ * ```
5515
+ */
5509
5516
public selectedColumns ( ) : IgxColumnComponent [ ] {
5510
5517
const fields = this . selectionService . getSelectedColumns ( ) ;
5511
5518
return fields . map ( field => this . getColumnByName ( field ) ) . filter ( field => field ) ;
@@ -5527,9 +5534,9 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
5527
5534
} else {
5528
5535
( columns as IgxColumnComponent [ ] ) . forEach ( col => {
5529
5536
if ( col . columnGroup ) {
5530
- const children = col . allChildren . filter ( c => ! c . columnGroup ) . map ( c => c . field ) ;
5531
- fieldToSelect = [ ...fieldToSelect , ...children ] ;
5532
- } else {
5537
+ const children = col . allChildren . filter ( c => ! c . columnGroup ) . map ( c => c . field ) ;
5538
+ fieldToSelect = [ ...fieldToSelect , ...children ] ;
5539
+ } else {
5533
5540
fieldToSelect . push ( col . field ) ;
5534
5541
}
5535
5542
} ) ;
@@ -5554,9 +5561,9 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
5554
5561
} else {
5555
5562
( columns as IgxColumnComponent [ ] ) . forEach ( col => {
5556
5563
if ( col . columnGroup ) {
5557
- const children = col . allChildren . filter ( c => ! c . columnGroup ) . map ( c => c . field ) ;
5558
- fieldToDeselect = [ ...fieldToDeselect , ...children ] ;
5559
- } else {
5564
+ const children = col . allChildren . filter ( c => ! c . columnGroup ) . map ( c => c . field ) ;
5565
+ fieldToDeselect = [ ...fieldToDeselect , ...children ] ;
5566
+ } else {
5560
5567
fieldToDeselect . push ( col . field ) ;
5561
5568
}
5562
5569
} ) ;
@@ -5565,25 +5572,25 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
5565
5572
this . notifyChanges ( ) ;
5566
5573
}
5567
5574
5568
- /**
5569
- * Deselects all columns
5570
- * @example
5571
- * ```typescript
5572
- * this.grid.deselectAllColumns();
5573
- * ```
5574
- */
5575
+ /**
5576
+ * Deselects all columns
5577
+ * @example
5578
+ * ```typescript
5579
+ * this.grid.deselectAllColumns();
5580
+ * ```
5581
+ */
5575
5582
public deselectAllColumns ( ) {
5576
5583
this . selectionService . clearAllSelectedColumns ( ) ;
5577
5584
this . notifyChanges ( ) ;
5578
5585
}
5579
5586
5580
- /**
5581
- * Selects all columns
5582
- * @example
5583
- * ```typescript
5584
- * this.grid.deselectAllColumns();
5585
- * ```
5586
- */
5587
+ /**
5588
+ * Selects all columns
5589
+ * @example
5590
+ * ```typescript
5591
+ * this.grid.deselectAllColumns();
5592
+ * ```
5593
+ */
5587
5594
public selectAllColumns ( ) {
5588
5595
this . selectColumns ( this . columnList . filter ( c => ! c . columnGroup ) ) ;
5589
5596
}
@@ -5619,7 +5626,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
5619
5626
* If `headers` is enabled, it will use the column header (if any) instead of the column field.
5620
5627
*/
5621
5628
public getSelectedColumnsData ( formatters = false , headers = false ) {
5622
- const source = this . filteredSortedData ? this . filteredSortedData : this . data ;
5629
+ const source = this . filteredSortedData ? this . filteredSortedData : this . data ;
5623
5630
return this . extractDataFromColumnsSelection ( source , formatters , headers ) ;
5624
5631
}
5625
5632
@@ -5710,34 +5717,36 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
5710
5717
this . navigation . performVerticalScrollToCell ( rowIndex , visibleColIndex , ( ) => {
5711
5718
if ( shouldScrollHorizontally ) {
5712
5719
this . navigation . performHorizontalScrollToCell ( visibleColIndex , ( ) =>
5713
- this . executeCallback ( rowIndex , visibleColIndex , cb ) ) ;
5720
+ this . executeCallback ( rowIndex , visibleColIndex , cb ) ) ;
5714
5721
} else {
5715
5722
this . executeCallback ( rowIndex , visibleColIndex , cb ) ;
5716
- } } ) ;
5723
+ }
5724
+ } ) ;
5717
5725
} else if ( shouldScrollHorizontally ) {
5718
5726
this . navigation . performHorizontalScrollToCell ( visibleColIndex , ( ) => {
5719
5727
if ( shouldScrollVertically ) {
5720
5728
this . navigation . performVerticalScrollToCell ( rowIndex , visibleColIndex , ( ) =>
5721
5729
this . executeCallback ( rowIndex , visibleColIndex , cb ) ) ;
5722
5730
} else {
5723
5731
this . executeCallback ( rowIndex , visibleColIndex , cb ) ;
5724
- } } ) ;
5732
+ }
5733
+ } ) ;
5725
5734
} else {
5726
5735
this . executeCallback ( rowIndex , visibleColIndex , cb ) ;
5727
5736
}
5728
5737
}
5729
5738
5730
- /**
5731
- * Returns `ICellPosition` which defines the next cell,
5732
- * according to the current position, that match specific criteria.
5733
- * @remarks
5734
- * You can pass callback function as a third parameter of `getPreviousCell` method.
5735
- * The callback function accepts IgxColumnComponent as a param
5736
- * @example
5737
- * ```typescript
5738
- * const nextEditableCellPosition = this.grid.getNextCell(0, 3, (column) => column.editable);
5739
- * ```
5740
- */
5739
+ /**
5740
+ * Returns `ICellPosition` which defines the next cell,
5741
+ * according to the current position, that match specific criteria.
5742
+ * @remarks
5743
+ * You can pass callback function as a third parameter of `getPreviousCell` method.
5744
+ * The callback function accepts IgxColumnComponent as a param
5745
+ * @example
5746
+ * ```typescript
5747
+ * const nextEditableCellPosition = this.grid.getNextCell(0, 3, (column) => column.editable);
5748
+ * ```
5749
+ */
5741
5750
public getNextCell ( currRowIndex : number , curVisibleColIndex : number ,
5742
5751
callback : ( IgxColumnComponent ) => boolean = null ) : ICellPosition {
5743
5752
const columns = this . columnList . filter ( col => ! col . columnGroup && col . visibleIndex >= 0 ) ;
@@ -5760,17 +5769,17 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
5760
5769
}
5761
5770
}
5762
5771
5763
- /**
5764
- * Returns `ICellPosition` which defines the previous cell,
5765
- * according to the current position, that match specific criteria.
5766
- * @remarks
5767
- * You can pass callback function as a third parameter of `getPreviousCell` method.
5768
- * The callback function accepts IgxColumnComponent as a param
5769
- * @example
5770
- * ```typescript
5771
- * const previousEditableCellPosition = this.grid.getPreviousCell(0, 3, (column) => column.editable);
5772
- * ```
5773
- */
5772
+ /**
5773
+ * Returns `ICellPosition` which defines the previous cell,
5774
+ * according to the current position, that match specific criteria.
5775
+ * @remarks
5776
+ * You can pass callback function as a third parameter of `getPreviousCell` method.
5777
+ * The callback function accepts IgxColumnComponent as a param
5778
+ * @example
5779
+ * ```typescript
5780
+ * const previousEditableCellPosition = this.grid.getPreviousCell(0, 3, (column) => column.editable);
5781
+ * ```
5782
+ */
5774
5783
public getPreviousCell ( currRowIndex : number , curVisibleColIndex : number ,
5775
5784
callback : ( IgxColumnComponent ) => boolean = null ) : ICellPosition {
5776
5785
const columns = this . columnList . filter ( col => ! col . columnGroup && col . visibleIndex >= 0 ) ;
@@ -5841,9 +5850,9 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
5841
5850
}
5842
5851
// find next/prev record that is editable.
5843
5852
const nextRowIndex = previous ? this . findPrevEditableDataRowIndex ( currentRowIndex ) :
5844
- this . dataView . findIndex ( ( rec , index ) =>
5845
- index > currentRowIndex && this . isEditableDataRecordAtIndex ( index ) ) ;
5846
- return nextRowIndex !== - 1 ? nextRowIndex : currentRowIndex ;
5853
+ this . dataView . findIndex ( ( rec , index ) =>
5854
+ index > currentRowIndex && this . isEditableDataRecordAtIndex ( index ) ) ;
5855
+ return nextRowIndex !== - 1 ? nextRowIndex : currentRowIndex ;
5847
5856
}
5848
5857
5849
5858
/**
@@ -5869,7 +5878,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
5869
5878
private isEditableDataRecordAtIndex ( dataViewIndex ) {
5870
5879
const rec = this . dataView [ dataViewIndex ] ;
5871
5880
return ! rec . expression && ! rec . summaries && ! rec . childGridsData && ! rec . detailsData &&
5872
- ! this . isGhostRecordAtIndex ( dataViewIndex ) ;
5881
+ ! this . isGhostRecordAtIndex ( dataViewIndex ) ;
5873
5882
}
5874
5883
5875
5884
/**
@@ -6237,7 +6246,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
6237
6246
private configureRowEditingOverlay ( rowID : any , useOuter = false ) {
6238
6247
this . rowEditSettings . outlet = useOuter ? this . parentRowOutletDirective : this . rowOutletDirective ;
6239
6248
this . rowEditPositioningStrategy . settings . container = this . tbody . nativeElement ;
6240
- const pinned = this . _pinnedRecordIDs . indexOf ( rowID ) !== - 1 ;
6249
+ const pinned = this . _pinnedRecordIDs . indexOf ( rowID ) !== - 1 ;
6241
6250
const targetRow = ! pinned ? this . gridAPI . get_row_by_key ( rowID ) : this . pinnedRows . find ( x => x . rowID === rowID ) ;
6242
6251
if ( ! targetRow ) {
6243
6252
return ;
0 commit comments