react-spectrum icon indicating copy to clipboard operation
react-spectrum copied to clipboard

TagGroup onAction

Open onx2 opened this issue 3 weeks ago โ€ข 3 comments

Provide a general summary of the issue here

The TagGroup omits onAction, meaning the group can't be used as an implementation of the layout grid pattern + selectionMode="none"

๐Ÿค” Expected Behavior?

I'd like to use the onAction in TagGroup, similar to the onRemove so these tags can be actionable, rather than selectable. This makes sense to be because that functionality already exists for links and onAction seems to work even though it isn't typed? ๐Ÿค”

๐Ÿ˜ฏ Current Behavior

The TagGroup doesn't expose onAction in the types like onRemove, so despite it working it fails tsc.

๐Ÿ’ Possible Solution

Expose onAction as it seems to work?

๐Ÿ”ฆ Context

No response

๐Ÿ–ฅ๏ธ Steps to Reproduce

This repo shows selectionMode="none" and interacting with the tags works with onAction: https://codesandbox.io/p/sandbox/react-aria-components-template-g7wmmk

Version

Latest

What browsers are you seeing the problem on?

Chrome

If other, please specify.

No response

What operating system are you using?

MacOS

๐Ÿงข Your Company/Team

No response

๐Ÿ•ท Tracking Issue

No response

onx2 avatar Nov 18 '25 11:11 onx2