---
alias: "fc.modal.button.addItem"
aliases:
  - fc.modal.button.addItem
category: action
module: OMS
---

# fc.modal.button.addItem

Add-item button used inside product search modals for order revision. Renders as an icon button (+) that calls an `onAddItem` callback with the current row's data.

## When to Use
- Inside a product search list within an order revision modal
- As an action column in a product search `fc.list` to add items to an order
- Part of the OMS order revision workflow

## Key Props
| Prop | Type | Required | What it controls |
|------|------|----------|------------------|
| `onAddItem` | `(item: any) => void` | Yes | Callback function invoked with the selected product's node data when the button is clicked |

## Data Binding
Reads the current row's data from the `useData()` hook (`context.data.node`). When clicked, passes the entire node object to the `onAddItem` callback.

## Descendants
No -- renders a single `IconButton` with a `+` icon.

## Composition Patterns
- Used internally by the OMS `ProductSearchModal` component
- Injected as a column in the product search list: `type: "component"` > `fc.modal.button.addItem`
- The `onAddItem` callback is typically wired to the order revision logic to add the selected product

## Gotchas
- This is an OMS module component -- requires the OMS plugin to be loaded.
- The `onAddItem` prop is a function reference, not a manifest-configurable string. It is typically injected programmatically by `ProductSearchModal`, not directly in manifest JSON.
- Reads from `useData().context.data.node` which means it must be inside a list row context where `node` is the current item.
- Renders as a small icon button with `GoPlus` icon -- not a full-size button.
- Registered with category `content` in the OMS component registry.

## Manifest Example
```json
{
  "label": "",
  "type": "component",
  "align": "right",
  "options": {
    "component": "fc.modal.button.addItem",
    "props": {
      "onAddItem": "handleAddItem"
    }
  }
}
```

## AI Parse Notes
- **Primary intent:** Declarative Mystique component definition for manifests.
- **Selection signals:** Match by `alias`, category, and required `Key Props`.
- **Assembly hints:** Combine with compatible parent/child components listed in `Composition Patterns`.
- **Safety checks:** Validate required props and data bindings before manifest generation.
