adobe / adobe/react-spectrum

ActionGroup's `summaryIcon` should change icon regardless `selectionMode`

Open
#5,099 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
15.9k
Forks
1.6k
Avg merge
3d 9m
Merged PRs (30d)
59

Description

### Provide a general summary of the feature here

1. Take `ActionGroup#Collapsing behavior#Selection` example ([link](https://react-spectrum.adobe.com/react-spectrum/ActionGroup.html#selection-1)).
2. Set `selectionMode` to `none`.

```ts
import TextStyle from '@spectrum-icons/workflow/TextStyle';

}
maxWidth={100}>


Bold



Italic



Underline



Strikethrough

```

### 🤔 Expected Behavior?

Icon is as specified by `selectionMode` (`TextStyle` in our example).

### 😯 Current Behavior

Icon switches back from specified `TextStyle` to default dot-dot-dot one.

### 💁 Possible Solution

_No response_

### 🔦 Context

Although it is mentioned in the doc:
> The icon displayed in the dropdown menu button when a **_selectable_** ActionGroup is collapsed.

I personally see no reason why the icon cannot be changed with `selectionMode` set to `none`. Such `ActionGroup`s are commonly used as a controlled element for menus.

### 💻 Examples

_No response_

### 🧢 Your Company/Team

_No response_

### 🕷 Tracking Issue

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.