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

Options for enhanceDropdown.

Type declaration

  • 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) => void

    Called with the item's value when a menu item is activated.

  • 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.