File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
packages/components/base/src/select Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { DISPLAY_NAME_ATTRIBUTE } from "@react-ck/react-utils";
33import { type SelectGroupProps } from "./types" ;
44import { Text } from "../text" ;
55import styles from "./styles/index.module.scss" ;
6+ import { useManagerContext } from "@react-ck/manager" ;
67
78/**
89 * A group component for organizing Select options with a label.
@@ -29,9 +30,13 @@ const SelectGroup = ({
2930 name,
3031 children,
3132} : Readonly < Omit < SelectGroupProps , "disabled" > > ) : React . ReactElement => {
33+ const { generateUniqueId } = useManagerContext ( ) ;
34+
35+ const uniqueId = generateUniqueId ( ) ;
36+
3237 return (
33- < div role = "group" aria-labelledby = { name } className = { styles . group } >
34- < div id = { name } className = { styles . group_name } >
38+ < div role = "group" aria-labelledby = { uniqueId } className = { styles . group } >
39+ < div id = { uniqueId } className = { styles . group_name } >
3540 < Text margin = "none" variation = "small" skin = { [ "bold" , "soft" ] } >
3641 { name }
3742 </ Text >
You can’t perform that action at this time.
0 commit comments