ChemPal Documentation - v0.0.13-beta.5
    Preparing search index...

    Props for SearchForm. Controls submit handling, the advanced-options button behavior, and the input's placeholder text.

    const props: SearchFormProps = {
    onSearch: (q) => runSearch(q),
    placeholder: "Search chemicals...",
    };
    interface SearchFormProps {
    /** Called with the trimmed query when the form is submitted. */
    onSearch: (query: string) => void;
    /** Overrides the advanced-options button action; defaults to toggling the app drawer. */
    onDrawerToggle?: () => void;
    /** Placeholder text for the input. Defaults to `"Search for products..."`. */
    placeholder?: string;
    /** Whether to show the advanced-options button. */
    showAdvancedButton?: boolean;
    }
    interface SearchFormProps {
        onSearch: (query: string) => void;
        onDrawerToggle?: () => void;
        placeholder?: string;
        showAdvancedButton?: boolean;
    }
    Index

    Properties

    onSearch: (query: string) => void

    Called with the trimmed query when the form is submitted.

    onDrawerToggle?: () => void

    Overrides the advanced-options button action; defaults to toggling the app drawer.

    placeholder?: string

    Placeholder text for the input. Defaults to "Search for products...".

    showAdvancedButton?: boolean

    Whether to show the advanced-options button.