@@ -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
/**
@@ -3843,7 +3850,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
3843
3850
'DropPosition.None is deprecated.' +
3844
3851
'Use DropPosition.AfterDropTarget instead.' ,
3845
3852
warningShown ) ;
3846
- position = DropPosition . AfterDropTarget ;
3853
+ position = DropPosition . AfterDropTarget ;
3847
3854
}
3848
3855
if ( ( column . level !== dropTarget . level ) ||
3849
3856
( column . topLevelParent !== dropTarget . topLevelParent ) ) {
@@ -4293,7 +4300,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
4293
4300
* @param rowID The row id - primaryKey value or the data record instance.
4294
4301
*/
4295
4302
public unpinRow ( rowID : any ) {
4296
- const index = this . _pinnedRecordIDs . indexOf ( rowID ) ;
4303
+ const index = this . _pinnedRecordIDs . indexOf ( rowID ) ;
4297
4304
if ( index === - 1 ) {
4298
4305
return false ;
4299
4306
}
@@ -4893,7 +4900,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
4893
4900
const diff = this . rowListDiffer . diff ( change ) ;
4894
4901
if ( diff ) {
4895
4902
this . notifyChanges ( true ) ;
4896
- }
4903
+ }
4897
4904
}
4898
4905
4899
4906
/**
@@ -5189,7 +5196,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
5189
5196
*/
5190
5197
protected reinitPinStates ( ) {
5191
5198
this . _pinnedColumns = this . columnList
5192
- . filter ( ( c ) => c . pinned ) . sort ( ( a , b ) => this . _pinnedColumns . indexOf ( a ) - this . _pinnedColumns . indexOf ( b ) ) ;
5199
+ . filter ( ( c ) => c . pinned ) . sort ( ( a , b ) => this . _pinnedColumns . indexOf ( a ) - this . _pinnedColumns . indexOf ( b ) ) ;
5193
5200
this . _unpinnedColumns = this . hasColumnGroups ? this . columnList . filter ( ( c ) => ! c . pinned ) :
5194
5201
this . columnList . filter ( ( c ) => ! c . pinned )
5195
5202
. sort ( ( a , b ) => this . _unpinnedColumns . indexOf ( a ) - this . _unpinnedColumns . indexOf ( b ) ) ;
@@ -5515,14 +5522,14 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
5515
5522
return this . extractDataFromSelection ( source , formatters , headers ) ;
5516
5523
}
5517
5524
5518
- /**
5519
- * Get current selected columns.
5520
- * @example
5521
- * Returns an array with selected columns
5522
- * ```typescript
5523
- * const selectedColumns = this.grid.selectedColumns();
5524
- * ```
5525
- */
5525
+ /**
5526
+ * Get current selected columns.
5527
+ * @example
5528
+ * Returns an array with selected columns
5529
+ * ```typescript
5530
+ * const selectedColumns = this.grid.selectedColumns();
5531
+ * ```
5532
+ */
5526
5533
public selectedColumns ( ) : IgxColumnComponent [ ] {
5527
5534
const fields = this . selectionService . getSelectedColumns ( ) ;
5528
5535
return fields . map ( field => this . getColumnByName ( field ) ) . filter ( field => field ) ;
@@ -5544,9 +5551,9 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
5544
5551
} else {
5545
5552
( columns as IgxColumnComponent [ ] ) . forEach ( col => {
5546
5553
if ( col . columnGroup ) {
5547
- const children = col . allChildren . filter ( c => ! c . columnGroup ) . map ( c => c . field ) ;
5548
- fieldToSelect = [ ...fieldToSelect , ...children ] ;
5549
- } else {
5554
+ const children = col . allChildren . filter ( c => ! c . columnGroup ) . map ( c => c . field ) ;
5555
+ fieldToSelect = [ ...fieldToSelect , ...children ] ;
5556
+ } else {
5550
5557
fieldToSelect . push ( col . field ) ;
5551
5558
}
5552
5559
} ) ;
@@ -5571,9 +5578,9 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
5571
5578
} else {
5572
5579
( columns as IgxColumnComponent [ ] ) . forEach ( col => {
5573
5580
if ( col . columnGroup ) {
5574
- const children = col . allChildren . filter ( c => ! c . columnGroup ) . map ( c => c . field ) ;
5575
- fieldToDeselect = [ ...fieldToDeselect , ...children ] ;
5576
- } else {
5581
+ const children = col . allChildren . filter ( c => ! c . columnGroup ) . map ( c => c . field ) ;
5582
+ fieldToDeselect = [ ...fieldToDeselect , ...children ] ;
5583
+ } else {
5577
5584
fieldToDeselect . push ( col . field ) ;
5578
5585
}
5579
5586
} ) ;
@@ -5582,25 +5589,25 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
5582
5589
this . notifyChanges ( ) ;
5583
5590
}
5584
5591
5585
- /**
5586
- * Deselects all columns
5587
- * @example
5588
- * ```typescript
5589
- * this.grid.deselectAllColumns();
5590
- * ```
5591
- */
5592
+ /**
5593
+ * Deselects all columns
5594
+ * @example
5595
+ * ```typescript
5596
+ * this.grid.deselectAllColumns();
5597
+ * ```
5598
+ */
5592
5599
public deselectAllColumns ( ) {
5593
5600
this . selectionService . clearAllSelectedColumns ( ) ;
5594
5601
this . notifyChanges ( ) ;
5595
5602
}
5596
5603
5597
- /**
5598
- * Selects all columns
5599
- * @example
5600
- * ```typescript
5601
- * this.grid.deselectAllColumns();
5602
- * ```
5603
- */
5604
+ /**
5605
+ * Selects all columns
5606
+ * @example
5607
+ * ```typescript
5608
+ * this.grid.deselectAllColumns();
5609
+ * ```
5610
+ */
5604
5611
public selectAllColumns ( ) {
5605
5612
this . selectColumns ( this . columnList . filter ( c => ! c . columnGroup ) ) ;
5606
5613
}
@@ -5636,7 +5643,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
5636
5643
* If `headers` is enabled, it will use the column header (if any) instead of the column field.
5637
5644
*/
5638
5645
public getSelectedColumnsData ( formatters = false , headers = false ) {
5639
- const source = this . filteredSortedData ? this . filteredSortedData : this . data ;
5646
+ const source = this . filteredSortedData ? this . filteredSortedData : this . data ;
5640
5647
return this . extractDataFromColumnsSelection ( source , formatters , headers ) ;
5641
5648
}
5642
5649
@@ -5727,34 +5734,36 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
5727
5734
this . navigation . performVerticalScrollToCell ( rowIndex , visibleColIndex , ( ) => {
5728
5735
if ( shouldScrollHorizontally ) {
5729
5736
this . navigation . performHorizontalScrollToCell ( visibleColIndex , ( ) =>
5730
- this . executeCallback ( rowIndex , visibleColIndex , cb ) ) ;
5737
+ this . executeCallback ( rowIndex , visibleColIndex , cb ) ) ;
5731
5738
} else {
5732
5739
this . executeCallback ( rowIndex , visibleColIndex , cb ) ;
5733
- } } ) ;
5740
+ }
5741
+ } ) ;
5734
5742
} else if ( shouldScrollHorizontally ) {
5735
5743
this . navigation . performHorizontalScrollToCell ( visibleColIndex , ( ) => {
5736
5744
if ( shouldScrollVertically ) {
5737
5745
this . navigation . performVerticalScrollToCell ( rowIndex , visibleColIndex , ( ) =>
5738
5746
this . executeCallback ( rowIndex , visibleColIndex , cb ) ) ;
5739
5747
} else {
5740
5748
this . executeCallback ( rowIndex , visibleColIndex , cb ) ;
5741
- } } ) ;
5749
+ }
5750
+ } ) ;
5742
5751
} else {
5743
5752
this . executeCallback ( rowIndex , visibleColIndex , cb ) ;
5744
5753
}
5745
5754
}
5746
5755
5747
- /**
5748
- * Returns `ICellPosition` which defines the next cell,
5749
- * according to the current position, that match specific criteria.
5750
- * @remarks
5751
- * You can pass callback function as a third parameter of `getPreviousCell` method.
5752
- * The callback function accepts IgxColumnComponent as a param
5753
- * @example
5754
- * ```typescript
5755
- * const nextEditableCellPosition = this.grid.getNextCell(0, 3, (column) => column.editable);
5756
- * ```
5757
- */
5756
+ /**
5757
+ * Returns `ICellPosition` which defines the next cell,
5758
+ * according to the current position, that match specific criteria.
5759
+ * @remarks
5760
+ * You can pass callback function as a third parameter of `getPreviousCell` method.
5761
+ * The callback function accepts IgxColumnComponent as a param
5762
+ * @example
5763
+ * ```typescript
5764
+ * const nextEditableCellPosition = this.grid.getNextCell(0, 3, (column) => column.editable);
5765
+ * ```
5766
+ */
5758
5767
public getNextCell ( currRowIndex : number , curVisibleColIndex : number ,
5759
5768
callback : ( IgxColumnComponent ) => boolean = null ) : ICellPosition {
5760
5769
const columns = this . columnList . filter ( col => ! col . columnGroup && col . visibleIndex >= 0 ) ;
@@ -5777,17 +5786,17 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
5777
5786
}
5778
5787
}
5779
5788
5780
- /**
5781
- * Returns `ICellPosition` which defines the previous cell,
5782
- * according to the current position, that match specific criteria.
5783
- * @remarks
5784
- * You can pass callback function as a third parameter of `getPreviousCell` method.
5785
- * The callback function accepts IgxColumnComponent as a param
5786
- * @example
5787
- * ```typescript
5788
- * const previousEditableCellPosition = this.grid.getPreviousCell(0, 3, (column) => column.editable);
5789
- * ```
5790
- */
5789
+ /**
5790
+ * Returns `ICellPosition` which defines the previous cell,
5791
+ * according to the current position, that match specific criteria.
5792
+ * @remarks
5793
+ * You can pass callback function as a third parameter of `getPreviousCell` method.
5794
+ * The callback function accepts IgxColumnComponent as a param
5795
+ * @example
5796
+ * ```typescript
5797
+ * const previousEditableCellPosition = this.grid.getPreviousCell(0, 3, (column) => column.editable);
5798
+ * ```
5799
+ */
5791
5800
public getPreviousCell ( currRowIndex : number , curVisibleColIndex : number ,
5792
5801
callback : ( IgxColumnComponent ) => boolean = null ) : ICellPosition {
5793
5802
const columns = this . columnList . filter ( col => ! col . columnGroup && col . visibleIndex >= 0 ) ;
@@ -5858,9 +5867,9 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
5858
5867
}
5859
5868
// find next/prev record that is editable.
5860
5869
const nextRowIndex = previous ? this . findPrevEditableDataRowIndex ( currentRowIndex ) :
5861
- this . dataView . findIndex ( ( rec , index ) =>
5862
- index > currentRowIndex && this . isEditableDataRecordAtIndex ( index ) ) ;
5863
- return nextRowIndex !== - 1 ? nextRowIndex : currentRowIndex ;
5870
+ this . dataView . findIndex ( ( rec , index ) =>
5871
+ index > currentRowIndex && this . isEditableDataRecordAtIndex ( index ) ) ;
5872
+ return nextRowIndex !== - 1 ? nextRowIndex : currentRowIndex ;
5864
5873
}
5865
5874
5866
5875
/**
@@ -5886,7 +5895,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
5886
5895
private isEditableDataRecordAtIndex ( dataViewIndex ) {
5887
5896
const rec = this . dataView [ dataViewIndex ] ;
5888
5897
return ! rec . expression && ! rec . summaries && ! rec . childGridsData && ! rec . detailsData &&
5889
- ! this . isGhostRecordAtIndex ( dataViewIndex ) ;
5898
+ ! this . isGhostRecordAtIndex ( dataViewIndex ) ;
5890
5899
}
5891
5900
5892
5901
/**
@@ -6254,7 +6263,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
6254
6263
private configureRowEditingOverlay ( rowID : any , useOuter = false ) {
6255
6264
this . rowEditSettings . outlet = useOuter ? this . parentRowOutletDirective : this . rowOutletDirective ;
6256
6265
this . rowEditPositioningStrategy . settings . container = this . tbody . nativeElement ;
6257
- const pinned = this . _pinnedRecordIDs . indexOf ( rowID ) !== - 1 ;
6266
+ const pinned = this . _pinnedRecordIDs . indexOf ( rowID ) !== - 1 ;
6258
6267
const targetRow = ! pinned ? this . gridAPI . get_row_by_key ( rowID ) : this . pinnedRows . find ( x => x . rowID === rowID ) ;
6259
6268
if ( ! targetRow ) {
6260
6269
return ;
0 commit comments