EnhanceDropdownOptions: {
    closeOnSelect?: boolean;
    defaultOpen?: boolean;
    onOpenChange?: (open: boolean) => void;
    onSelect?: (value: string, item: HTMLElement, checked?: boolean) => void;
    placement?: Placement;
    position?: boolean;
}

Options for enhanceDropdown.

Type declaration

  • OptionalcloseOnSelect?: boolean

    Close the menu after an item is activated. Defaults to true. Set to false for menus of menuitemcheckbox items that should stay open while several are toggled.

  • OptionaldefaultOpen?: boolean

    Open the menu immediately on enhance, without moving focus. Defaults to false.

  • OptionalonOpenChange?: (open: boolean) => void

    Called after the menu opens or closes.

  • OptionalonSelect?: (value: string, item: HTMLElement, checked?: boolean) => void

    Called with the item's value when a menu item is activated. For menuitemcheckbox/menuitemradio items, checked is the new state.

  • Optionalplacement?: Placement

    Placement passed to the JS positioning fallback. Defaults to bottom-start.

  • Optionalposition?: boolean

    Run the JS positioning fallback when CSS anchor positioning is missing. Defaults to true.