Skip to content

Commit e892f4b

Browse files
authored
Add TagGroup component to RAC (#4661)
1 parent 4373d5a commit e892f4b

File tree

6 files changed

+999
-2
lines changed

6 files changed

+999
-2
lines changed

packages/@react-aria/tag/src/useTagGroup.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export const hookData = new WeakMap<ListState<any>, HookData>();
5454

5555
/**
5656
* Provides the behavior and accessibility implementation for a tag group component.
57-
* A tag group is a focusable list of labels, categories, keywords, or other items, with support for keyboard navigation and removal.
57+
* A tag group is a focusable list of labels, categories, keywords, filters, or other items, with support for keyboard navigation, selection, and removal.
5858
* @param props - Props to be applied to the tag group.
5959
* @param state - State for the tag group, as returned by `useListState`.
6060
* @param ref - A ref to a DOM element for the tag group.
@@ -68,7 +68,10 @@ export function useTagGroup<T>(props: AriaTagGroupOptions<T>, state: ListState<T
6868
direction,
6969
disabledKeys: state.disabledKeys
7070
});
71-
let {labelProps, fieldProps, descriptionProps, errorMessageProps} = useField(props);
71+
let {labelProps, fieldProps, descriptionProps, errorMessageProps} = useField({
72+
...props,
73+
labelElementType: 'span'
74+
});
7275
let {gridProps} = useGridList({
7376
...props,
7477
...fieldProps,

0 commit comments

Comments
 (0)