@@ -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
@@ -2884,7 +2884,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
2884
2884
this . notifyChanges ( ) ;
2885
2885
} ) ;
2886
2886
2887
- 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 } ) )
2888
2888
. subscribe ( ( ) => {
2889
2889
this . zone . run ( ( ) => {
2890
2890
this . notifyChanges ( true ) ;
@@ -3021,9 +3021,9 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
3021
3021
public setFilteredData ( data , pinned : boolean ) {
3022
3022
if ( this . hasPinnedRecords && pinned ) {
3023
3023
this . _filteredPinnedData = data || [ ] ;
3024
- const filteredUnpinned = this . _filteredUnpinnedData || [ ] ;
3025
- const filteredData = [ ... this . _filteredPinnedData , ... filteredUnpinned ] ;
3026
- 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 ;
3027
3027
} else if ( this . hasPinnedRecords && ! pinned ) {
3028
3028
this . _filteredUnpinnedData = data ;
3029
3029
} else {
@@ -3084,7 +3084,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
3084
3084
this . _filteredSortedPinnedData = data ;
3085
3085
this . pinnedRecords = data ;
3086
3086
this . _filteredSortedData = this . isRowPinningToTop ? [ ... this . _filteredSortedPinnedData , ... this . _filteredSortedUnpinnedData ] :
3087
- [ ... this . _filteredSortedUnpinnedData , ... this . _filteredSortedPinnedData ] ;
3087
+ [ ... this . _filteredSortedUnpinnedData , ... this . _filteredSortedPinnedData ] ;
3088
3088
this . refreshSearch ( true , false ) ;
3089
3089
} else if ( this . pinnedRecordsCount > 0 && ! pinned ) {
3090
3090
this . _filteredSortedUnpinnedData = data ;
@@ -3136,16 +3136,16 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
3136
3136
this . _setupRowObservers ( ) ;
3137
3137
this . _zoneBegoneListeners ( ) ;
3138
3138
3139
- this . paginatorSettings = { outlet : this . outletDirective } ;
3139
+ this . paginatorSettings = { outlet : this . outlet } ;
3140
3140
3141
3141
const vertScrDC = this . verticalScrollContainer . displayContainer ;
3142
3142
vertScrDC . addEventListener ( 'scroll' , this . preventContainerScroll ) ;
3143
3143
3144
3144
this . _pinnedRowList . changes
3145
- . pipe ( takeUntil ( this . destroy$ ) )
3146
- . subscribe ( ( change : QueryList < IgxGridRowComponent > ) => {
3147
- this . onPinnedRowsChanged ( change ) ;
3148
- } ) ;
3145
+ . pipe ( takeUntil ( this . destroy$ ) )
3146
+ . subscribe ( ( change : QueryList < IgxGridRowComponent > ) => {
3147
+ this . onPinnedRowsChanged ( change ) ;
3148
+ } ) ;
3149
3149
}
3150
3150
3151
3151
/**
@@ -3850,7 +3850,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
3850
3850
'DropPosition.None is deprecated.' +
3851
3851
'Use DropPosition.AfterDropTarget instead.' ,
3852
3852
warningShown ) ;
3853
- position = DropPosition . AfterDropTarget ;
3853
+ position = DropPosition . AfterDropTarget ;
3854
3854
}
3855
3855
if ( ( column . level !== dropTarget . level ) ||
3856
3856
( column . topLevelParent !== dropTarget . topLevelParent ) ) {
@@ -4300,7 +4300,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
4300
4300
* @param rowID The row id - primaryKey value or the data record instance.
4301
4301
*/
4302
4302
public unpinRow ( rowID : any ) {
4303
- const index = this . _pinnedRecordIDs . indexOf ( rowID ) ;
4303
+ const index = this . _pinnedRecordIDs . indexOf ( rowID ) ;
4304
4304
if ( index === - 1 ) {
4305
4305
return false ;
4306
4306
}
@@ -4900,7 +4900,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
4900
4900
const diff = this . rowListDiffer . diff ( change ) ;
4901
4901
if ( diff ) {
4902
4902
this . notifyChanges ( true ) ;
4903
- }
4903
+ }
4904
4904
}
4905
4905
4906
4906
/**
@@ -5196,7 +5196,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
5196
5196
*/
5197
5197
protected reinitPinStates ( ) {
5198
5198
this . _pinnedColumns = this . columnList
5199
- . 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 ) ) ;
5200
5200
this . _unpinnedColumns = this . hasColumnGroups ? this . columnList . filter ( ( c ) => ! c . pinned ) :
5201
5201
this . columnList . filter ( ( c ) => ! c . pinned )
5202
5202
. sort ( ( a , b ) => this . _unpinnedColumns . indexOf ( a ) - this . _unpinnedColumns . indexOf ( b ) ) ;
@@ -5522,14 +5522,14 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
5522
5522
return this . extractDataFromSelection ( source , formatters , headers ) ;
5523
5523
}
5524
5524
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
- */
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
+ */
5533
5533
public selectedColumns ( ) : IgxColumnComponent [ ] {
5534
5534
const fields = this . selectionService . getSelectedColumns ( ) ;
5535
5535
return fields . map ( field => this . getColumnByName ( field ) ) . filter ( field => field ) ;
@@ -5551,9 +5551,9 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
5551
5551
} else {
5552
5552
( columns as IgxColumnComponent [ ] ) . forEach ( col => {
5553
5553
if ( col . columnGroup ) {
5554
- const children = col . allChildren . filter ( c => ! c . columnGroup ) . map ( c => c . field ) ;
5555
- fieldToSelect = [ ...fieldToSelect , ...children ] ;
5556
- } else {
5554
+ const children = col . allChildren . filter ( c => ! c . columnGroup ) . map ( c => c . field ) ;
5555
+ fieldToSelect = [ ...fieldToSelect , ...children ] ;
5556
+ } else {
5557
5557
fieldToSelect . push ( col . field ) ;
5558
5558
}
5559
5559
} ) ;
@@ -5578,9 +5578,9 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
5578
5578
} else {
5579
5579
( columns as IgxColumnComponent [ ] ) . forEach ( col => {
5580
5580
if ( col . columnGroup ) {
5581
- const children = col . allChildren . filter ( c => ! c . columnGroup ) . map ( c => c . field ) ;
5582
- fieldToDeselect = [ ...fieldToDeselect , ...children ] ;
5583
- } else {
5581
+ const children = col . allChildren . filter ( c => ! c . columnGroup ) . map ( c => c . field ) ;
5582
+ fieldToDeselect = [ ...fieldToDeselect , ...children ] ;
5583
+ } else {
5584
5584
fieldToDeselect . push ( col . field ) ;
5585
5585
}
5586
5586
} ) ;
@@ -5589,25 +5589,25 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
5589
5589
this . notifyChanges ( ) ;
5590
5590
}
5591
5591
5592
- /**
5593
- * Deselects all columns
5594
- * @example
5595
- * ```typescript
5596
- * this.grid.deselectAllColumns();
5597
- * ```
5598
- */
5592
+ /**
5593
+ * Deselects all columns
5594
+ * @example
5595
+ * ```typescript
5596
+ * this.grid.deselectAllColumns();
5597
+ * ```
5598
+ */
5599
5599
public deselectAllColumns ( ) {
5600
5600
this . selectionService . clearAllSelectedColumns ( ) ;
5601
5601
this . notifyChanges ( ) ;
5602
5602
}
5603
5603
5604
- /**
5605
- * Selects all columns
5606
- * @example
5607
- * ```typescript
5608
- * this.grid.deselectAllColumns();
5609
- * ```
5610
- */
5604
+ /**
5605
+ * Selects all columns
5606
+ * @example
5607
+ * ```typescript
5608
+ * this.grid.deselectAllColumns();
5609
+ * ```
5610
+ */
5611
5611
public selectAllColumns ( ) {
5612
5612
this . selectColumns ( this . columnList . filter ( c => ! c . columnGroup ) ) ;
5613
5613
}
@@ -5643,7 +5643,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
5643
5643
* If `headers` is enabled, it will use the column header (if any) instead of the column field.
5644
5644
*/
5645
5645
public getSelectedColumnsData ( formatters = false , headers = false ) {
5646
- const source = this . filteredSortedData ? this . filteredSortedData : this . data ;
5646
+ const source = this . filteredSortedData ? this . filteredSortedData : this . data ;
5647
5647
return this . extractDataFromColumnsSelection ( source , formatters , headers ) ;
5648
5648
}
5649
5649
@@ -5734,34 +5734,36 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
5734
5734
this . navigation . performVerticalScrollToCell ( rowIndex , visibleColIndex , ( ) => {
5735
5735
if ( shouldScrollHorizontally ) {
5736
5736
this . navigation . performHorizontalScrollToCell ( visibleColIndex , ( ) =>
5737
- this . executeCallback ( rowIndex , visibleColIndex , cb ) ) ;
5737
+ this . executeCallback ( rowIndex , visibleColIndex , cb ) ) ;
5738
5738
} else {
5739
5739
this . executeCallback ( rowIndex , visibleColIndex , cb ) ;
5740
- } } ) ;
5740
+ }
5741
+ } ) ;
5741
5742
} else if ( shouldScrollHorizontally ) {
5742
5743
this . navigation . performHorizontalScrollToCell ( visibleColIndex , ( ) => {
5743
5744
if ( shouldScrollVertically ) {
5744
5745
this . navigation . performVerticalScrollToCell ( rowIndex , visibleColIndex , ( ) =>
5745
5746
this . executeCallback ( rowIndex , visibleColIndex , cb ) ) ;
5746
5747
} else {
5747
5748
this . executeCallback ( rowIndex , visibleColIndex , cb ) ;
5748
- } } ) ;
5749
+ }
5750
+ } ) ;
5749
5751
} else {
5750
5752
this . executeCallback ( rowIndex , visibleColIndex , cb ) ;
5751
5753
}
5752
5754
}
5753
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
+ /**
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
+ */
5765
5767
public getNextCell ( currRowIndex : number , curVisibleColIndex : number ,
5766
5768
callback : ( IgxColumnComponent ) => boolean = null ) : ICellPosition {
5767
5769
const columns = this . columnList . filter ( col => ! col . columnGroup && col . visibleIndex >= 0 ) ;
@@ -5784,17 +5786,17 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
5784
5786
}
5785
5787
}
5786
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
+ /**
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
+ */
5798
5800
public getPreviousCell ( currRowIndex : number , curVisibleColIndex : number ,
5799
5801
callback : ( IgxColumnComponent ) => boolean = null ) : ICellPosition {
5800
5802
const columns = this . columnList . filter ( col => ! col . columnGroup && col . visibleIndex >= 0 ) ;
@@ -5865,9 +5867,9 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
5865
5867
}
5866
5868
// find next/prev record that is editable.
5867
5869
const nextRowIndex = previous ? this . findPrevEditableDataRowIndex ( currentRowIndex ) :
5868
- this . dataView . findIndex ( ( rec , index ) =>
5869
- index > currentRowIndex && this . isEditableDataRecordAtIndex ( index ) ) ;
5870
- return nextRowIndex !== - 1 ? nextRowIndex : currentRowIndex ;
5870
+ this . dataView . findIndex ( ( rec , index ) =>
5871
+ index > currentRowIndex && this . isEditableDataRecordAtIndex ( index ) ) ;
5872
+ return nextRowIndex !== - 1 ? nextRowIndex : currentRowIndex ;
5871
5873
}
5872
5874
5873
5875
/**
@@ -5893,7 +5895,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
5893
5895
private isEditableDataRecordAtIndex ( dataViewIndex ) {
5894
5896
const rec = this . dataView [ dataViewIndex ] ;
5895
5897
return ! rec . expression && ! rec . summaries && ! rec . childGridsData && ! rec . detailsData &&
5896
- ! this . isGhostRecordAtIndex ( dataViewIndex ) ;
5898
+ ! this . isGhostRecordAtIndex ( dataViewIndex ) ;
5897
5899
}
5898
5900
5899
5901
/**
@@ -6261,7 +6263,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
6261
6263
private configureRowEditingOverlay ( rowID : any , useOuter = false ) {
6262
6264
this . rowEditSettings . outlet = useOuter ? this . parentRowOutletDirective : this . rowOutletDirective ;
6263
6265
this . rowEditPositioningStrategy . settings . container = this . tbody . nativeElement ;
6264
- const pinned = this . _pinnedRecordIDs . indexOf ( rowID ) !== - 1 ;
6266
+ const pinned = this . _pinnedRecordIDs . indexOf ( rowID ) !== - 1 ;
6265
6267
const targetRow = ! pinned ? this . gridAPI . get_row_by_key ( rowID ) : this . pinnedRows . find ( x => x . rowID === rowID ) ;
6266
6268
if ( ! targetRow ) {
6267
6269
return ;
0 commit comments