Skip to content

Commit

Permalink
Fix TagGroup docs example (adobe#6759)
Browse files Browse the repository at this point in the history
  • Loading branch information
devongovett committed 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

0 comments on commit 05a37a0

Please sign in to comment.