sparc - v1.0.1
    Preparing search index...
    interface ComboBoxProps {
        allowFiltering?: boolean;
        allowMultiple?: boolean;
        class?: string;
        clearText?: string;
        containerSelector?: string;
        dataset: ComboBoxOptionProps[];
        filteringFunction?: (search: string) => ComboBoxOptionProps[];
        id?: string;
        isDisabled?: boolean;
        isLoading?: boolean;
        onSelectHandler?: (
            selection: ComboBoxOptionProps | ComboBoxOptionProps[],
        ) => void;
        placeholder?: string;
        returnFullDataset?: boolean;
        title?: string;
    }

    Hierarchy (View Summary)

    Index

    Properties

    allowFiltering?: boolean

    Indicates if dataset is filterable

    false
    
    allowMultiple?: boolean

    Allows the user to select multiple options.

    false
    
    class?: string

    Regular HTML class names

    clearText?: string

    If filtering is enabled, then this is used for the clear button's text

    "Clear..."
    
    containerSelector?: string

    Valid CSS selector targeting the current element's parent.

    const myElement = new Element({...,containerSelector:"#login-form",...})
    myElement.render() //my element will be appended to #login-form

    Dataset passed by reference. If a nullish value or an empty array is passed, the combobox is automatically disabled

    filteringFunction?: (search: string) => ComboBoxOptionProps[]

    When provided, this will be used to filter the elements accordingly.

    Type declaration

    fuse.js
    
    id?: string

    if a value is provided, sparc will not use automatic UUID generation!

    isDisabled?: boolean

    Use this boolean flag to toggle a css class disabling interactions with the component.

    isLoading?: boolean

    Use this boolean flag to toggle a css class while the async component loads.

    onSelectHandler?: (
        selection: ComboBoxOptionProps | ComboBoxOptionProps[],
    ) => void

    Callback that receives the current dataset value each time an option is selected

    placeholder?: string

    Placeholder text for the input field

    "Select..."
    
    returnFullDataset?: boolean

    Boolean flag to indicate whether the full options array should be returned, or only an array containing the checked options

    false
    
    title?: string

    Currently used as a tooltip. Displays the current value by default