Skip to content

Commit

Permalink
Merge pull request #3662 from IgniteUI/mpavlov/pinning-docs
Browse files Browse the repository at this point in the history
fix(docs): Adding description for column.pin and column.unpin APIs #3660
  • Loading branch information
kdinev authored Jan 18, 2019
2 parents 64bd5e0 + f12ee6c commit 4a046ec
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
17 changes: 13 additions & 4 deletions projects/igniteui-angular/src/lib/grids/column.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -939,12 +939,17 @@ export class IgxColumnComponent implements AfterContentInit {
}
/**
* Pins the column at the provided index in the pinned area. Defaults to index `0` if not provided.
* Returns `true` if the column is successfully pinned. Returns `false` if the column cannot be pinned.
* Column cannot be pinned if:
* - Is already pinned
* - index argument is out of range
* - The pinned area exceeds 80% of the grid width
* ```typescript
* this.column.pin();
* let success = this.column.pin();
* ```
* @memberof IgxColumnComponent
*/
public pin(index?) {
public pin(index?: number): boolean {
// TODO: Probably should the return type of the old functions
// should be moved as a event parameter.
if (this.grid) {
Expand Down Expand Up @@ -1003,12 +1008,16 @@ export class IgxColumnComponent implements AfterContentInit {
}
/**
* Unpins the column and place it at the provided index in the unpinned area. Defaults to index `0` if not provided.
* Returns `true` if the column is successfully unpinned. Returns `false` if the column cannot be unpinned.
* Column cannot be unpinned if:
* - Is already unpinned
* - index argument is out of range
* ```typescript
* this.column.unpin();
* let success = this.column.unpin();
* ```
* @memberof IgxColumnComponent
*/
public unpin(index?) {
public unpin(index?: number): boolean {
if (this.grid) {
this.grid.endEdit(true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2373,6 +2373,7 @@ export abstract class IgxGridBaseComponent extends DisplayDensityBase implements

/**
* Returns the maximum width of the container for the pinned `IgxColumnComponent`s.
* The width is 80% of the total grid width.
* ```typescript
* const maxPinnedColWidth = this.grid.calcPinnedContainerMaxWidth;
* ```
Expand All @@ -2384,6 +2385,7 @@ export abstract class IgxGridBaseComponent extends DisplayDensityBase implements

/**
* Returns the minimum width of the container for the unpinned `IgxColumnComponent`s.
* The width is 20% of the total grid width.
* ```typescript
* const minUnpinnedColWidth = this.grid.unpinnedAreaMinWidth;
* ```
Expand Down

0 comments on commit 4a046ec

Please sign in to comment.