Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/@react-aria/tag/src/useTag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ export interface TagAria {
*/
export function useTag<T>(props: TagProps<T>, state: TagGroupState<T>, ref: RefObject<FocusableElement>): TagAria {
let {
isFocused,
allowsRemoving,
item
} = props;
Expand Down Expand Up @@ -73,8 +72,8 @@ export function useTag<T>(props: TagProps<T>, state: TagGroupState<T>, ref: RefO
let description = allowsRemoving && (modality === 'keyboard' || modality === 'virtual') ? stringFormatter.format('removeDescription') : '';
let descProps = useDescription(description);

isFocused = isFocused || state.selectionManager.focusedKey === item.key;
let domProps = filterDOMProps(props);
let isFocused = item.key === state.selectionManager.focusedKey;
return {
clearButtonProps: {
'aria-label': stringFormatter.format('removeButtonLabel', {label: item.textValue}),
Expand Down
1 change: 0 additions & 1 deletion packages/@react-spectrum/tag/src/Tag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ export function Tag<T>(props: SpectrumTagProps<T>) {
let ref = useRef();
let {clearButtonProps, labelProps, gridCellProps, rowProps} = useTag({
...props,
isFocused,
allowsRemoving,
item,
onRemove
Expand Down
2 changes: 0 additions & 2 deletions packages/@react-types/tag/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ export interface TagGroupProps<T> extends Omit<CollectionBase<T>, 'disabledKeys'
}

export interface TagProps<T> extends ItemProps<any> {
/** Whether the tag is focused. */
isFocused: boolean,
/** Whether the tag is removable. */
allowsRemoving?: boolean,
/** An object representing the tag. Contains all the relevant information that makes up the tag. */
Expand Down