Skip to content

Commit 71d9252

Browse files
Flo0807Copilot
andauthored
Add documentation for except keyword for item action placement (#1330)
* Add documentation for `except` keyword for item action placement * Update guides/actions/item-actions.md Co-authored-by: Copilot <[email protected]> * Add space --------- Co-authored-by: Copilot <[email protected]>
1 parent 256d41c commit 71d9252

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

guides/actions/item-actions.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,14 @@ See `Backpex.ItemAction` for a list of all available callbacks.
7777

7878
## Placement of Item Actions
7979

80-
Item actions can be placed in the resource table or at the top of it. You can specify the placement of the item action by using the `only` key.
80+
Item actions can be placed in the resource table or at the top of it. You can specify the placement of the item action by using the `only` and `except` keys.
8181

82-
The only key must provide a list and accepts the following options
82+
The `only` key is used to include specified placements, meaning the item action will only appear in the specified locations. In contrast, the `except` key is used to exclude specified placements, meaning the item action will appear in all locations except those specified.
8383

84-
* `:row` - display an icon for each element in the table that can trigger the Item Action for the corresponding element
85-
* `:index` - display a button at the top of the resource table, which triggers the Item Action for selected items
84+
The `only` and `except` keys must provide a list and accept the following options:
85+
86+
* `:row` - displays an icon for each element in the table, clicking it triggers the item action for the corresponding element
87+
* `:index` - displays a button at the top of the resource table, clicking it will trigger the item action for selected items
8688

8789
The following example shows how to place the `show` item action on the index table rows only.
8890

0 commit comments

Comments
 (0)