|
| 1 | +# igx-action-strip |
| 2 | + |
| 3 | +The **igx-action-strip** provides a template area for one or more actions. |
| 4 | +In its simplest form the Action Strip is an overlay of any container and shows additional content over that container. |
| 5 | +A walk-through of how to get started can be found [here](https://www.infragistics.com/products/ignite-ui-angular/angular/components/action_strip.html) |
| 6 | + |
| 7 | +# Usage |
| 8 | +The Action Strip can be initialized in any HTML element that can contain elements. This parent element should be with a relative position as the action strip is trying to overlay it. Interactions with the parent and its content are available while the action strip is shown. |
| 9 | +```html |
| 10 | +<igx-action-strip #actionstrip> |
| 11 | + <igx-icon (click)="doSomeAction()"></igx-icon> |
| 12 | +</igx-action-strip> |
| 13 | +``` |
| 14 | + |
| 15 | +# Grid Action Components |
| 16 | +Action strip provides functionality and UI for IgxGrid. All that can be utilized with grid action components. These components inherit `IgxGridActionsBaseDirective` and when creating a custom grid action component, this component should also inherit `IgxGridActionsBaseDirective`. |
| 17 | + |
| 18 | +```html |
| 19 | +<igx-action-strip #actionstrip> |
| 20 | + <igx-grid-editing-actions [grid]="grid1"></igx-grid-editing-actions> |
| 21 | + <igx-grid-pinning-actions [grid]="grid1"></igx-grid-pinning-actions> |
| 22 | +</igx-action-strip> |
| 23 | +``` |
| 24 | + |
| 25 | +# IgxActionStripMenuItem |
| 26 | + |
| 27 | +The Action Strip can show items as menu. This is achieved with `igxActionStripMenuItem` directive applied to its content. Action strip will render three-dot button that toggles a drop down. And the content will be those items that are marked with `igxActionStripMenuItem` directive. |
| 28 | + |
| 29 | +```html |
| 30 | +<igx-action-strip #actionStrip1> |
| 31 | + <span *IgxActionStripMenuItem>Copy</span> |
| 32 | + <span *IgxActionStripMenuItem>Paste</span> |
| 33 | + <span *IgxActionStripMenuItem>Edit</span> |
| 34 | +</igx-action-strip> |
| 35 | +``` |
| 36 | +# API Summary |
| 37 | + |
| 38 | +## Inputs |
| 39 | +`IgxActionStripComponent` |
| 40 | + |
| 41 | + | Name | Description | Type | Default value | |
| 42 | + |-----------------|---------------------------------------------------|-----------------------------|---------------| |
| 43 | + | hidden | An @Input property that sets the visibility of the Action Strip. | boolean | `false` | |
| 44 | + | context | Sets the context of an action strip. The context should be an instance of a @Component, that has element property. This element will be the placeholder of the action strip. | any | | |
| 45 | + |
| 46 | +`IgxGridActionsBaseDirective` ( `IgxGridPinningActionsComponent`, `IgxGridEditingActionsComponent`) |
| 47 | + |
| 48 | + | Name | Description | Type | Default value | |
| 49 | + |-----------------|---------------------------------------------------|-----------------------------|---------------| |
| 50 | + | grid | Set an instance of the grid for which to display the actions. | any | | |
| 51 | + | context | Sets the context of an action strip. The context is expected to be grid cell or grid row | any | | |
| 52 | + |
| 53 | +## Outputs |
| 54 | +|Name|Description|Cancelable|Parameters| |
| 55 | +|--|--|--|--| |
| 56 | +| onMenuOpening | Emitted before the menu is opened | true | | |
| 57 | +| onMenuOpened | Emitted after the menu is opened | false | | |
| 58 | + |
| 59 | +## Methods |
| 60 | + |
| 61 | +`IgxActionStripComponent` |
| 62 | + |
| 63 | + | Name | Description | Return type | Parameters | |
| 64 | + |----------|----------------------------|---------------------------------------------------|----------------------| |
| 65 | + | show | Showing the Action Strip and appending it the specified context element. | void | context | |
| 66 | + | hide | Hiding the Action Strip and removing it from its current context element. | void | | |
| 67 | + |
| 68 | +`IgxGridPinningActionsComponent` |
| 69 | + | Name | Description | Return type | Parameters | |
| 70 | + |----------|----------------------------|---------------------------------------------------|----------------------| |
| 71 | + | pin | Pin the row according to the context. | void | | |
| 72 | + | unpin | Unpin the row according to the context. | void | | |
| 73 | + |
| 74 | +`IgxGridPinningActionsComponent` |
| 75 | + | Name | Description | Return type | Parameters | |
| 76 | + |----------|----------------------------|---------------------------------------------------|----------------------| |
| 77 | + | startEdit | Enter row or cell edit mode depending the grid `rowEdibable` option | void | | |
| 78 | + | deleteRow | Delete a row according to the context | void | | |
0 commit comments