createListNavigation is the core primitive for all collection components (Listbox, Select, Combobox, Menu). It provides value-based keyboard navigation, selection/activation modes, typeahead, and aria-activedescendant virtual focus. Listbox: standalone selectable list with single/multiple selection. Select: floating dropdown with trigger, keyboard navigation, form integration. Also fixes exactOptionalPropertyTypes compatibility in createDisclosureState and createListNavigation interfaces.
17 lines
440 B
TypeScript
17 lines
440 B
TypeScript
import type { JSX } from "solid-js";
|
|
import { splitProps } from "solid-js";
|
|
|
|
export interface SelectGroupProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
children?: JSX.Element;
|
|
}
|
|
|
|
/** Groups related Select items together. */
|
|
export function SelectGroup(props: SelectGroupProps): JSX.Element {
|
|
const [local, rest] = splitProps(props, ["children"]);
|
|
return (
|
|
<div role="group" {...rest}>
|
|
{local.children}
|
|
</div>
|
|
);
|
|
}
|