@@ -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
@@ -2644,6 +2644,11 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
2644
2644
positionStrategy : this . rowEditPositioningStrategy
2645
2645
} ;
2646
2646
2647
+ /**
2648
+ * @hidden @internal
2649
+ */
2650
+ public paginatorSettings : OverlaySettings = null ;
2651
+
2647
2652
private verticalScrollHandler = ( event ) => {
2648
2653
this . verticalScrollContainer . onScroll ( event ) ;
2649
2654
this . disableTransitions = true ;
@@ -2879,7 +2884,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
2879
2884
this . notifyChanges ( ) ;
2880
2885
} ) ;
2881
2886
2882
- this . resizeNotify . pipe ( destructor , filter ( ( ) => ! this . _init ) , throttleTime ( 100 , undefined , { leading : true , trailing : true } ) )
2887
+ this . resizeNotify . pipe ( destructor , filter ( ( ) => ! this . _init ) , throttleTime ( 100 , undefined , { leading : true , trailing : true } ) )
2883
2888
. subscribe ( ( ) => {
2884
2889
this . zone . run ( ( ) => {
2885
2890
this . notifyChanges ( true ) ;
@@ -3016,9 +3021,9 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
3016
3021
public setFilteredData ( data , pinned : boolean ) {
3017
3022
if ( this . hasPinnedRecords && pinned ) {
3018
3023
this . _filteredPinnedData = data || [ ] ;
3019
- const filteredUnpinned = this . _filteredUnpinnedData || [ ] ;
3020
- const filteredData = [ ... this . _filteredPinnedData , ... filteredUnpinned ] ;
3021
- this . filteredData = filteredData . length > 0 ? filteredData : this . _filteredUnpinnedData ;
3024
+ const filteredUnpinned = this . _filteredUnpinnedData || [ ] ;
3025
+ const filteredData = [ ... this . _filteredPinnedData , ...filteredUnpinned ] ;
3026
+ this . filteredData = filteredData . length > 0 ? filteredData : this . _filteredUnpinnedData ;
3022
3027
} else if ( this . hasPinnedRecords && ! pinned ) {
3023
3028
this . _filteredUnpinnedData = data ;
3024
3029
} else {
@@ -3079,7 +3084,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
3079
3084
this . _filteredSortedPinnedData = data ;
3080
3085
this . pinnedRecords = data ;
3081
3086
this . _filteredSortedData = this . isRowPinningToTop ? [ ... this . _filteredSortedPinnedData , ... this . _filteredSortedUnpinnedData ] :
3082
- [ ... this . _filteredSortedUnpinnedData , ... this . _filteredSortedPinnedData ] ;
3087
+ [ ... this . _filteredSortedUnpinnedData , ... this . _filteredSortedPinnedData ] ;
3083
3088
this . refreshSearch ( true , false ) ;
3084
3089
} else if ( this . pinnedRecordsCount > 0 && ! pinned ) {
3085
3090
this . _filteredSortedUnpinnedData = data ;
@@ -3131,14 +3136,16 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
3131
3136
this . _setupRowObservers ( ) ;
3132
3137
this . _zoneBegoneListeners ( ) ;
3133
3138
3139
+ this . paginatorSettings = { outlet : this . outlet } ;
3140
+
3134
3141
const vertScrDC = this . verticalScrollContainer . displayContainer ;
3135
3142
vertScrDC . addEventListener ( 'scroll' , this . preventContainerScroll ) ;
3136
3143
3137
3144
this . _pinnedRowList . changes
3138
- . pipe ( takeUntil ( this . destroy$ ) )
3139
- . subscribe ( ( change : QueryList < IgxGridRowComponent > ) => {
3140
- this . onPinnedRowsChanged ( change ) ;
3141
- } ) ;
3145
+ . pipe ( takeUntil ( this . destroy$ ) )
3146
+ . subscribe ( ( change : QueryList < IgxGridRowComponent > ) => {
3147
+ this . onPinnedRowsChanged ( change ) ;
3148
+ } ) ;
3142
3149
}
3143
3150
3144
3151
/**
@@ -3841,7 +3848,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
3841
3848
'DropPosition.None is deprecated.' +
3842
3849
'Use DropPosition.AfterDropTarget instead.' ,
3843
3850
warningShown ) ;
3844
- position = DropPosition . AfterDropTarget ;
3851
+ position = DropPosition . AfterDropTarget ;
3845
3852
}
3846
3853
if ( ( column . level !== dropTarget . level ) ||
3847
3854
( column . topLevelParent !== dropTarget . topLevelParent ) ) {
@@ -4291,7 +4298,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
4291
4298
* @param rowID The row id - primaryKey value or the data record instance.
4292
4299
*/
4293
4300
public unpinRow ( rowID : any ) {
4294
- const index = this . _pinnedRecordIDs . indexOf ( rowID ) ;
4301
+ const index = this . _pinnedRecordIDs . indexOf ( rowID ) ;
4295
4302
if ( index === - 1 ) {
4296
4303
return false ;
4297
4304
}
@@ -4891,7 +4898,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
4891
4898
const diff = this . rowListDiffer . diff ( change ) ;
4892
4899
if ( diff ) {
4893
4900
this . notifyChanges ( true ) ;
4894
- }
4901
+ }
4895
4902
}
4896
4903
4897
4904
/**
@@ -5187,7 +5194,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
5187
5194
*/
5188
5195
protected reinitPinStates ( ) {
5189
5196
this . _pinnedColumns = this . columnList
5190
- . filter ( ( c ) => c . pinned ) . sort ( ( a , b ) => this . _pinnedColumns . indexOf ( a ) - this . _pinnedColumns . indexOf ( b ) ) ;
5197
+ . filter ( ( c ) => c . pinned ) . sort ( ( a , b ) => this . _pinnedColumns . indexOf ( a ) - this . _pinnedColumns . indexOf ( b ) ) ;
5191
5198
this . _unpinnedColumns = this . hasColumnGroups ? this . columnList . filter ( ( c ) => ! c . pinned ) :
5192
5199
this . columnList . filter ( ( c ) => ! c . pinned )
5193
5200
. sort ( ( a , b ) => this . _unpinnedColumns . indexOf ( a ) - this . _unpinnedColumns . indexOf ( b ) ) ;
@@ -5513,14 +5520,14 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
5513
5520
return this . extractDataFromSelection ( source , formatters , headers ) ;
5514
5521
}
5515
5522
5516
- /**
5517
- * Get current selected columns.
5518
- * @example
5519
- * Returns an array with selected columns
5520
- * ```typescript
5521
- * const selectedColumns = this.grid.selectedColumns();
5522
- * ```
5523
- */
5523
+ /**
5524
+ * Get current selected columns.
5525
+ * @example
5526
+ * Returns an array with selected columns
5527
+ * ```typescript
5528
+ * const selectedColumns = this.grid.selectedColumns();
5529
+ * ```
5530
+ */
5524
5531
public selectedColumns ( ) : IgxColumnComponent [ ] {
5525
5532
const fields = this . selectionService . getSelectedColumns ( ) ;
5526
5533
return fields . map ( field => this . getColumnByName ( field ) ) . filter ( field => field ) ;
@@ -5542,9 +5549,9 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
5542
5549
} else {
5543
5550
( columns as IgxColumnComponent [ ] ) . forEach ( col => {
5544
5551
if ( col . columnGroup ) {
5545
- const children = col . allChildren . filter ( c => ! c . columnGroup ) . map ( c => c . field ) ;
5546
- fieldToSelect = [ ...fieldToSelect , ...children ] ;
5547
- } else {
5552
+ const children = col . allChildren . filter ( c => ! c . columnGroup ) . map ( c => c . field ) ;
5553
+ fieldToSelect = [ ...fieldToSelect , ...children ] ;
5554
+ } else {
5548
5555
fieldToSelect . push ( col . field ) ;
5549
5556
}
5550
5557
} ) ;
@@ -5569,9 +5576,9 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
5569
5576
} else {
5570
5577
( columns as IgxColumnComponent [ ] ) . forEach ( col => {
5571
5578
if ( col . columnGroup ) {
5572
- const children = col . allChildren . filter ( c => ! c . columnGroup ) . map ( c => c . field ) ;
5573
- fieldToDeselect = [ ...fieldToDeselect , ...children ] ;
5574
- } else {
5579
+ const children = col . allChildren . filter ( c => ! c . columnGroup ) . map ( c => c . field ) ;
5580
+ fieldToDeselect = [ ...fieldToDeselect , ...children ] ;
5581
+ } else {
5575
5582
fieldToDeselect . push ( col . field ) ;
5576
5583
}
5577
5584
} ) ;
@@ -5580,25 +5587,25 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
5580
5587
this . notifyChanges ( ) ;
5581
5588
}
5582
5589
5583
- /**
5584
- * Deselects all columns
5585
- * @example
5586
- * ```typescript
5587
- * this.grid.deselectAllColumns();
5588
- * ```
5589
- */
5590
+ /**
5591
+ * Deselects all columns
5592
+ * @example
5593
+ * ```typescript
5594
+ * this.grid.deselectAllColumns();
5595
+ * ```
5596
+ */
5590
5597
public deselectAllColumns ( ) {
5591
5598
this . selectionService . clearAllSelectedColumns ( ) ;
5592
5599
this . notifyChanges ( ) ;
5593
5600
}
5594
5601
5595
- /**
5596
- * Selects all columns
5597
- * @example
5598
- * ```typescript
5599
- * this.grid.deselectAllColumns();
5600
- * ```
5601
- */
5602
+ /**
5603
+ * Selects all columns
5604
+ * @example
5605
+ * ```typescript
5606
+ * this.grid.deselectAllColumns();
5607
+ * ```
5608
+ */
5602
5609
public selectAllColumns ( ) {
5603
5610
this . selectColumns ( this . columnList . filter ( c => ! c . columnGroup ) ) ;
5604
5611
}
@@ -5634,7 +5641,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
5634
5641
* If `headers` is enabled, it will use the column header (if any) instead of the column field.
5635
5642
*/
5636
5643
public getSelectedColumnsData ( formatters = false , headers = false ) {
5637
- const source = this . filteredSortedData ? this . filteredSortedData : this . data ;
5644
+ const source = this . filteredSortedData ? this . filteredSortedData : this . data ;
5638
5645
return this . extractDataFromColumnsSelection ( source , formatters , headers ) ;
5639
5646
}
5640
5647
@@ -5725,34 +5732,36 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
5725
5732
this . navigation . performVerticalScrollToCell ( rowIndex , visibleColIndex , ( ) => {
5726
5733
if ( shouldScrollHorizontally ) {
5727
5734
this . navigation . performHorizontalScrollToCell ( visibleColIndex , ( ) =>
5728
- this . executeCallback ( rowIndex , visibleColIndex , cb ) ) ;
5735
+ this . executeCallback ( rowIndex , visibleColIndex , cb ) ) ;
5729
5736
} else {
5730
5737
this . executeCallback ( rowIndex , visibleColIndex , cb ) ;
5731
- } } ) ;
5738
+ }
5739
+ } ) ;
5732
5740
} else if ( shouldScrollHorizontally ) {
5733
5741
this . navigation . performHorizontalScrollToCell ( visibleColIndex , ( ) => {
5734
5742
if ( shouldScrollVertically ) {
5735
5743
this . navigation . performVerticalScrollToCell ( rowIndex , visibleColIndex , ( ) =>
5736
5744
this . executeCallback ( rowIndex , visibleColIndex , cb ) ) ;
5737
5745
} else {
5738
5746
this . executeCallback ( rowIndex , visibleColIndex , cb ) ;
5739
- } } ) ;
5747
+ }
5748
+ } ) ;
5740
5749
} else {
5741
5750
this . executeCallback ( rowIndex , visibleColIndex , cb ) ;
5742
5751
}
5743
5752
}
5744
5753
5745
- /**
5746
- * Returns `ICellPosition` which defines the next cell,
5747
- * according to the current position, that match specific criteria.
5748
- * @remarks
5749
- * You can pass callback function as a third parameter of `getPreviousCell` method.
5750
- * The callback function accepts IgxColumnComponent as a param
5751
- * @example
5752
- * ```typescript
5753
- * const nextEditableCellPosition = this.grid.getNextCell(0, 3, (column) => column.editable);
5754
- * ```
5755
- */
5754
+ /**
5755
+ * Returns `ICellPosition` which defines the next cell,
5756
+ * according to the current position, that match specific criteria.
5757
+ * @remarks
5758
+ * You can pass callback function as a third parameter of `getPreviousCell` method.
5759
+ * The callback function accepts IgxColumnComponent as a param
5760
+ * @example
5761
+ * ```typescript
5762
+ * const nextEditableCellPosition = this.grid.getNextCell(0, 3, (column) => column.editable);
5763
+ * ```
5764
+ */
5756
5765
public getNextCell ( currRowIndex : number , curVisibleColIndex : number ,
5757
5766
callback : ( IgxColumnComponent ) => boolean = null ) : ICellPosition {
5758
5767
const columns = this . columnList . filter ( col => ! col . columnGroup && col . visibleIndex >= 0 ) ;
@@ -5775,17 +5784,17 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
5775
5784
}
5776
5785
}
5777
5786
5778
- /**
5779
- * Returns `ICellPosition` which defines the previous cell,
5780
- * according to the current position, that match specific criteria.
5781
- * @remarks
5782
- * You can pass callback function as a third parameter of `getPreviousCell` method.
5783
- * The callback function accepts IgxColumnComponent as a param
5784
- * @example
5785
- * ```typescript
5786
- * const previousEditableCellPosition = this.grid.getPreviousCell(0, 3, (column) => column.editable);
5787
- * ```
5788
- */
5787
+ /**
5788
+ * Returns `ICellPosition` which defines the previous cell,
5789
+ * according to the current position, that match specific criteria.
5790
+ * @remarks
5791
+ * You can pass callback function as a third parameter of `getPreviousCell` method.
5792
+ * The callback function accepts IgxColumnComponent as a param
5793
+ * @example
5794
+ * ```typescript
5795
+ * const previousEditableCellPosition = this.grid.getPreviousCell(0, 3, (column) => column.editable);
5796
+ * ```
5797
+ */
5789
5798
public getPreviousCell ( currRowIndex : number , curVisibleColIndex : number ,
5790
5799
callback : ( IgxColumnComponent ) => boolean = null ) : ICellPosition {
5791
5800
const columns = this . columnList . filter ( col => ! col . columnGroup && col . visibleIndex >= 0 ) ;
@@ -5856,9 +5865,9 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
5856
5865
}
5857
5866
// find next/prev record that is editable.
5858
5867
const nextRowIndex = previous ? this . findPrevEditableDataRowIndex ( currentRowIndex ) :
5859
- this . dataView . findIndex ( ( rec , index ) =>
5860
- index > currentRowIndex && this . isEditableDataRecordAtIndex ( index ) ) ;
5861
- return nextRowIndex !== - 1 ? nextRowIndex : currentRowIndex ;
5868
+ this . dataView . findIndex ( ( rec , index ) =>
5869
+ index > currentRowIndex && this . isEditableDataRecordAtIndex ( index ) ) ;
5870
+ return nextRowIndex !== - 1 ? nextRowIndex : currentRowIndex ;
5862
5871
}
5863
5872
5864
5873
/**
@@ -5884,7 +5893,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
5884
5893
private isEditableDataRecordAtIndex ( dataViewIndex ) {
5885
5894
const rec = this . dataView [ dataViewIndex ] ;
5886
5895
return ! rec . expression && ! rec . summaries && ! rec . childGridsData && ! rec . detailsData &&
5887
- ! this . isGhostRecordAtIndex ( dataViewIndex ) ;
5896
+ ! this . isGhostRecordAtIndex ( dataViewIndex ) ;
5888
5897
}
5889
5898
5890
5899
/**
@@ -6252,7 +6261,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
6252
6261
private configureRowEditingOverlay ( rowID : any , useOuter = false ) {
6253
6262
this . rowEditSettings . outlet = useOuter ? this . parentRowOutletDirective : this . rowOutletDirective ;
6254
6263
this . rowEditPositioningStrategy . settings . container = this . tbody . nativeElement ;
6255
- const pinned = this . _pinnedRecordIDs . indexOf ( rowID ) !== - 1 ;
6264
+ const pinned = this . _pinnedRecordIDs . indexOf ( rowID ) !== - 1 ;
6256
6265
const targetRow = ! pinned ? this . gridAPI . get_row_by_key ( rowID ) : this . pinnedRows . find ( x => x . rowID === rowID ) ;
6257
6266
if ( ! targetRow ) {
6258
6267
return ;
0 commit comments