@@ -610,15 +610,15 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
610610 public dragRowID = null ;
611611
612612
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+ */
622622 @WatchChanges ( )
623623 @Input ( )
624624 get rowEditable ( ) : boolean {
@@ -1096,13 +1096,13 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
10961096 @Output ( )
10971097 public onRowSelectionChange = new EventEmitter < IRowSelectionEventArgs > ( ) ;
10981098
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+ */
11061106 @Output ( )
11071107 public onColumnSelectionChange = new EventEmitter < IColumnSelectionEventArgs > ( ) ;
11081108
@@ -2644,6 +2644,11 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
26442644 positionStrategy : this . rowEditPositioningStrategy
26452645 } ;
26462646
2647+ /**
2648+ * @hidden @internal
2649+ */
2650+ public paginatorSettings : OverlaySettings = null ;
2651+
26472652 private verticalScrollHandler = ( event ) => {
26482653 this . verticalScrollContainer . onScroll ( event ) ;
26492654 this . disableTransitions = true ;
@@ -2879,7 +2884,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
28792884 this . notifyChanges ( ) ;
28802885 } ) ;
28812886
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 } ) )
28832888 . subscribe ( ( ) => {
28842889 this . zone . run ( ( ) => {
28852890 this . notifyChanges ( true ) ;
@@ -3016,9 +3021,9 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
30163021 public setFilteredData ( data , pinned : boolean ) {
30173022 if ( this . hasPinnedRecords && pinned ) {
30183023 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 ;
30223027 } else if ( this . hasPinnedRecords && ! pinned ) {
30233028 this . _filteredUnpinnedData = data ;
30243029 } else {
@@ -3079,7 +3084,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
30793084 this . _filteredSortedPinnedData = data ;
30803085 this . pinnedRecords = data ;
30813086 this . _filteredSortedData = this . isRowPinningToTop ? [ ... this . _filteredSortedPinnedData , ... this . _filteredSortedUnpinnedData ] :
3082- [ ... this . _filteredSortedUnpinnedData , ... this . _filteredSortedPinnedData ] ;
3087+ [ ... this . _filteredSortedUnpinnedData , ... this . _filteredSortedPinnedData ] ;
30833088 this . refreshSearch ( true , false ) ;
30843089 } else if ( this . pinnedRecordsCount > 0 && ! pinned ) {
30853090 this . _filteredSortedUnpinnedData = data ;
@@ -3131,14 +3136,16 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
31313136 this . _setupRowObservers ( ) ;
31323137 this . _zoneBegoneListeners ( ) ;
31333138
3139+ this . paginatorSettings = { outlet : this . outlet } ;
3140+
31343141 const vertScrDC = this . verticalScrollContainer . displayContainer ;
31353142 vertScrDC . addEventListener ( 'scroll' , this . preventContainerScroll ) ;
31363143
31373144 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+ } ) ;
31423149 }
31433150
31443151 /**
@@ -3843,7 +3850,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
38433850 'DropPosition.None is deprecated.' +
38443851 'Use DropPosition.AfterDropTarget instead.' ,
38453852 warningShown ) ;
3846- position = DropPosition . AfterDropTarget ;
3853+ position = DropPosition . AfterDropTarget ;
38473854 }
38483855 if ( ( column . level !== dropTarget . level ) ||
38493856 ( column . topLevelParent !== dropTarget . topLevelParent ) ) {
@@ -4293,7 +4300,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
42934300 * @param rowID The row id - primaryKey value or the data record instance.
42944301 */
42954302 public unpinRow ( rowID : any ) {
4296- const index = this . _pinnedRecordIDs . indexOf ( rowID ) ;
4303+ const index = this . _pinnedRecordIDs . indexOf ( rowID ) ;
42974304 if ( index === - 1 ) {
42984305 return false ;
42994306 }
@@ -4893,7 +4900,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
48934900 const diff = this . rowListDiffer . diff ( change ) ;
48944901 if ( diff ) {
48954902 this . notifyChanges ( true ) ;
4896- }
4903+ }
48974904 }
48984905
48994906 /**
@@ -5189,7 +5196,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
51895196 */
51905197 protected reinitPinStates ( ) {
51915198 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 ) ) ;
51935200 this . _unpinnedColumns = this . hasColumnGroups ? this . columnList . filter ( ( c ) => ! c . pinned ) :
51945201 this . columnList . filter ( ( c ) => ! c . pinned )
51955202 . sort ( ( a , b ) => this . _unpinnedColumns . indexOf ( a ) - this . _unpinnedColumns . indexOf ( b ) ) ;
@@ -5515,14 +5522,14 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
55155522 return this . extractDataFromSelection ( source , formatters , headers ) ;
55165523 }
55175524
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+ */
55265533 public selectedColumns ( ) : IgxColumnComponent [ ] {
55275534 const fields = this . selectionService . getSelectedColumns ( ) ;
55285535 return fields . map ( field => this . getColumnByName ( field ) ) . filter ( field => field ) ;
@@ -5544,9 +5551,9 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
55445551 } else {
55455552 ( columns as IgxColumnComponent [ ] ) . forEach ( col => {
55465553 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 {
55505557 fieldToSelect . push ( col . field ) ;
55515558 }
55525559 } ) ;
@@ -5571,9 +5578,9 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
55715578 } else {
55725579 ( columns as IgxColumnComponent [ ] ) . forEach ( col => {
55735580 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 {
55775584 fieldToDeselect . push ( col . field ) ;
55785585 }
55795586 } ) ;
@@ -5582,25 +5589,25 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
55825589 this . notifyChanges ( ) ;
55835590 }
55845591
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+ */
55925599 public deselectAllColumns ( ) {
55935600 this . selectionService . clearAllSelectedColumns ( ) ;
55945601 this . notifyChanges ( ) ;
55955602 }
55965603
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+ */
56045611 public selectAllColumns ( ) {
56055612 this . selectColumns ( this . columnList . filter ( c => ! c . columnGroup ) ) ;
56065613 }
@@ -5636,7 +5643,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
56365643 * If `headers` is enabled, it will use the column header (if any) instead of the column field.
56375644 */
56385645 public getSelectedColumnsData ( formatters = false , headers = false ) {
5639- const source = this . filteredSortedData ? this . filteredSortedData : this . data ;
5646+ const source = this . filteredSortedData ? this . filteredSortedData : this . data ;
56405647 return this . extractDataFromColumnsSelection ( source , formatters , headers ) ;
56415648 }
56425649
@@ -5727,34 +5734,36 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
57275734 this . navigation . performVerticalScrollToCell ( rowIndex , visibleColIndex , ( ) => {
57285735 if ( shouldScrollHorizontally ) {
57295736 this . navigation . performHorizontalScrollToCell ( visibleColIndex , ( ) =>
5730- this . executeCallback ( rowIndex , visibleColIndex , cb ) ) ;
5737+ this . executeCallback ( rowIndex , visibleColIndex , cb ) ) ;
57315738 } else {
57325739 this . executeCallback ( rowIndex , visibleColIndex , cb ) ;
5733- } } ) ;
5740+ }
5741+ } ) ;
57345742 } else if ( shouldScrollHorizontally ) {
57355743 this . navigation . performHorizontalScrollToCell ( visibleColIndex , ( ) => {
57365744 if ( shouldScrollVertically ) {
57375745 this . navigation . performVerticalScrollToCell ( rowIndex , visibleColIndex , ( ) =>
57385746 this . executeCallback ( rowIndex , visibleColIndex , cb ) ) ;
57395747 } else {
57405748 this . executeCallback ( rowIndex , visibleColIndex , cb ) ;
5741- } } ) ;
5749+ }
5750+ } ) ;
57425751 } else {
57435752 this . executeCallback ( rowIndex , visibleColIndex , cb ) ;
57445753 }
57455754 }
57465755
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+ */
57585767 public getNextCell ( currRowIndex : number , curVisibleColIndex : number ,
57595768 callback : ( IgxColumnComponent ) => boolean = null ) : ICellPosition {
57605769 const columns = this . columnList . filter ( col => ! col . columnGroup && col . visibleIndex >= 0 ) ;
@@ -5777,17 +5786,17 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
57775786 }
57785787 }
57795788
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+ */
57915800 public getPreviousCell ( currRowIndex : number , curVisibleColIndex : number ,
57925801 callback : ( IgxColumnComponent ) => boolean = null ) : ICellPosition {
57935802 const columns = this . columnList . filter ( col => ! col . columnGroup && col . visibleIndex >= 0 ) ;
@@ -5858,9 +5867,9 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
58585867 }
58595868 // find next/prev record that is editable.
58605869 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 ;
58645873 }
58655874
58665875 /**
@@ -5886,7 +5895,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
58865895 private isEditableDataRecordAtIndex ( dataViewIndex ) {
58875896 const rec = this . dataView [ dataViewIndex ] ;
58885897 return ! rec . expression && ! rec . summaries && ! rec . childGridsData && ! rec . detailsData &&
5889- ! this . isGhostRecordAtIndex ( dataViewIndex ) ;
5898+ ! this . isGhostRecordAtIndex ( dataViewIndex ) ;
58905899 }
58915900
58925901 /**
@@ -6254,7 +6263,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
62546263 private configureRowEditingOverlay ( rowID : any , useOuter = false ) {
62556264 this . rowEditSettings . outlet = useOuter ? this . parentRowOutletDirective : this . rowOutletDirective ;
62566265 this . rowEditPositioningStrategy . settings . container = this . tbody . nativeElement ;
6257- const pinned = this . _pinnedRecordIDs . indexOf ( rowID ) !== - 1 ;
6266+ const pinned = this . _pinnedRecordIDs . indexOf ( rowID ) !== - 1 ;
62586267 const targetRow = ! pinned ? this . gridAPI . get_row_by_key ( rowID ) : this . pinnedRows . find ( x => x . rowID === rowID ) ;
62596268 if ( ! targetRow ) {
62606269 return ;
0 commit comments