(props: SelectGroupProps)
| 71 | /// ``` |
| 72 | #[component] |
| 73 | pub fn SelectGroup(props: SelectGroupProps) -> Element { |
| 74 | let ctx = use_context::<SelectContext>(); |
| 75 | let disabled = ctx.selectable.disabled.cloned() || props.disabled.cloned(); |
| 76 | |
| 77 | let labeled_by = use_signal(|| None); |
| 78 | |
| 79 | use_context_provider(|| SelectGroupContext { labeled_by }); |
| 80 | let render = use_context::<ListboxContext>().render; |
| 81 | |
| 82 | rsx! { |
| 83 | if render() { |
| 84 | div { |
| 85 | role: "group", |
| 86 | |
| 87 | // ARIA attributes |
| 88 | aria_disabled: disabled, |
| 89 | aria_labelledby: labeled_by, |
| 90 | |
| 91 | ..props.attributes, |
| 92 | {props.children} |
| 93 | } |
| 94 | } else { |
| 95 | // If we are not rendering, still render the children components |
| 96 | {props.children} |
| 97 | } |
| 98 | } |
| 99 | } |
| 100 | |
| 101 | /// The props for the [`SelectGroupLabel`] component |
| 102 | #[derive(Props, Clone, PartialEq)] |
nothing calls this directly
no outgoing calls
no test coverage detected