ItemView.addAction method
ItemView › addAction
Adds an icon button to the view's header.The mock does not attach the button or wire the callback: it returns a new detached element.
Signature:
addAction(_icon: string, _title: string, _callback: (event: MouseEvent) => unknown): HTMLElementParameters:
| Parameter | Type | Description |
|---|---|---|
| _icon | string | The icon id to show on the button. |
| _title | string | The button's tooltip. |
| _callback | (event: MouseEvent) => unknown | The handler to call when the button is clicked; never called by the mock. |
Returns: HTMLElement — A new detached element standing in for the button.