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

    Interface AppContextProps

    AppContextProps interface for application context

    interface AppContextProps {
        userSettings: UserSettings;
        setUserSettings: (settings: UserSettings) => void;
        searchResults: Product[];
        setSearchResults: (results: Product[]) => void;
        setPanel?: (panel: number) => void;
        setDrawerTab: (tab: number) => void;
        toggleDrawer: () => void;
        drawerTab?: number;
        selectedSuppliers?: string[];
        setSelectedSuppliers: (suppliers: string[]) => void;
        pendingSearchQuery: null | string;
        setPendingSearchQuery: (query: null | string) => void;
        searchFilters: SearchFilters;
        setSearchFilters: (filters: SearchFilters) => void;
        bookmarksFolderId?: null | string;
        setBookmarksFolderId: (id: null | string) => void;
    }
    Index

    Properties

    userSettings: UserSettings

    Application settings

    setUserSettings: (settings: UserSettings) => void

    Function to update settings

    searchResults: Product[]

    Search results

    setSearchResults: (results: Product[]) => void

    Function to update search results

    setPanel?: (panel: number) => void

    Function to update panel

    setDrawerTab: (tab: number) => void

    Function to update drawer tab

    toggleDrawer: () => void

    Function to toggle drawer

    drawerTab?: number

    Drawer state management - -1 = closed, 0 = search tab, 1 = history tab, 2 = settings tab

    selectedSuppliers?: string[]

    Selected Suppliers

    setSelectedSuppliers: (suppliers: string[]) => void

    Function to update selected suppliers

    pendingSearchQuery: null | string

    Pending search query set from history panel (consumed by ResultsTable)

    setPendingSearchQuery: (query: null | string) => void

    Function to set a pending search query

    searchFilters: SearchFilters

    Pre-search filters from the drawer

    setSearchFilters: (filters: SearchFilters) => void

    Function to update pre-search filters

    bookmarksFolderId?: null | string

    ID of the ChemPal Favorites bookmarks folder (null if not yet resolved)

    setBookmarksFolderId: (id: null | string) => void

    Function to store the bookmarks folder ID