2019-09-07 09:16:00 +00:00
|
|
|
# ContextMenu
|
|
|
|
|
2019-11-20 06:07:53 +00:00
|
|
|
ContextMenu is used for a call context actions on a page.
|
|
|
|
|
|
|
|
> Implemented as part of RowContainer component.
|
|
|
|
|
|
|
|
### Usage
|
2019-09-07 09:16:00 +00:00
|
|
|
|
|
|
|
```js
|
2019-09-10 12:48:51 +00:00
|
|
|
import { ContextMenu } from "asc-web-components";
|
2019-09-07 09:16:00 +00:00
|
|
|
```
|
|
|
|
|
2019-11-20 06:07:53 +00:00
|
|
|
```jsx
|
2020-10-16 13:16:01 +00:00
|
|
|
<ContextMenu targetAreaId="rowContainer" options={[]} />
|
2019-11-20 06:07:53 +00:00
|
|
|
```
|
2019-09-07 09:16:00 +00:00
|
|
|
|
2019-11-11 08:12:44 +00:00
|
|
|
For use within separate component it is necessary to determine active zone and events for calling and transferring options in menu.
|
|
|
|
|
|
|
|
In particular case, state is created containing options for particular Row element and passed to component when called.
|
|
|
|
|
2019-11-20 06:07:53 +00:00
|
|
|
### Properties
|
2019-09-07 09:16:00 +00:00
|
|
|
|
2019-11-27 13:06:48 +00:00
|
|
|
| Props | Type | Required | Values | Default | Description |
|
|
|
|
| -------------- | :------------: | :------: | :----: | :-----------: | ------------------------ |
|
|
|
|
| `className` | `string` | - | - | - | Accepts class |
|
|
|
|
| `id` | `string` | - | - | `contextMenu` | Accepts id |
|
|
|
|
| `options` | `array` | - | - | `[ ]` | DropDownItems collection |
|
|
|
|
| `style` | `obj`, `array` | - | - | - | Accepts css style |
|
|
|
|
| `targetAreaId` | `string` | - | - | - | Id of container apply to |
|