Skip to content

Commit

Permalink
Fix TagGroup docs example (#6759)
Browse files Browse the repository at this point in the history
  • Loading branch information
devongovett authored Jul 23, 2024
1 parent 291033b commit 05a37a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/react-aria-components/docs/TagGroup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -707,9 +707,9 @@ import {ListStateContext} from 'react-aria-components';

function SelectionCount() {
/*- begin highlight -*/
let state = React.useContext(ListStateContext)!;
let state = React.useContext(ListStateContext);
/*- end highlight -*/
let selected = state.selectionManager.selectedKeys.size;
let selected = state?.selectionManager.selectedKeys.size ?? 0;
return <small>{selected} tags selected.</small>;
}

Expand Down

1 comment on commit 05a37a0

@rspbot
Copy link

@rspbot rspbot commented on 05a37a0 Jul 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.