You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* merge docs
* merge stories/examples
* merge stories/fixtures
* move itemRole to item and delete dropdonwmenu
* add test for single selection
* Add tests for additional use cases
* delete outdated snapshot
* add changeset
* fix group roles based on latest discussion
* Revert "fix group roles based on latest discussion"
This reverts commit 1e90bda.
* Update docs/content/drafts/ActionMenu2.mdx
Co-authored-by: Cole Bemis <[email protected]>
* use merged ActionMenu instead of Dropdown in Overlay
* bring back DropdownMenu2 part 1/2
* bring back DropdownMenu2 part 2/2
Co-authored-by: Cole Bemis <[email protected]>
To create an anchor outside of the menu, you need to switch to controlled mode for the menu and pass it as `anchorRef` to `ActionMenu`. Make sure you add `aria-expanded` and `aria-haspopup` to the external anchor:
@@ -241,12 +279,6 @@ render(
241
279
)
242
280
```
243
281
244
-
<Note variant="warning">
245
-
246
-
Use `ActionMenu` to choose an action from a list. If you’re looking for single or multiple selection, use [DropdownMenu](/DropdownMenu) or [SelectPanel](/SelectPanel) instead.
247
-
248
-
</Note>
249
-
250
282
## Props / API reference
251
283
252
284
### ActionMenu
@@ -305,6 +337,5 @@ Use `ActionMenu` to choose an action from a list. If you’re looking for single
// if selectionVariant is not set on List, don't show selection
22
19
if(!selectionVariant){
23
-
// to avoid confusion, fail loudly instead of silently ignoring
24
-
if(selected)
20
+
// if selectionVariant is not set on List, but Item is selected
21
+
// fail loudly instead of silently ignoring
22
+
if(selected){
25
23
thrownewError(
26
24
'For Item to be selected, ActionList or ActionList.Group needs to have a selectionVariant defined'
27
25
)
28
-
returnnull
29
-
}
30
-
31
-
if(container==='ActionMenu'){
32
-
thrownewError(
33
-
'ActionList cannot have a selectionVariant inside ActionMenu, please use DropdownMenu or SelectPanel instead. More information: https://primer.style/design/components/action-list#application'
'selectionVariant multiple cannot be used in DropdownMenu, please use SelectPanel instead. More information: https://primer.style/design/components/action-list#application'
0 commit comments