Websites v4 docs v8.3.1
    Preparing search index...

    Interface UseClientSectionControlResult

    interface UseClientSectionControlResult {
        handleBooleanUpdate: () => void;
        handleDebouncedTextUpdate: (content: string) => void;
        handleImageUpdate: (image: ImageField) => void;
        handleMultiKeyValueUpdate: (value: KeyValuePair[]) => void;
        handleMultiSelectUpdate: (
            selected: MultiSelectOption | MultiSelectOption[] | null,
        ) => void;
        handleMultiTextInputUpdate: (value: string[]) => void;
        handleTextUpdate: (content: string) => void;
        handleUpdate: (content?: string | number | null) => void;
        handleUpdateByField: (
            field: string,
            content?: string | number | null,
        ) => void;
        handleVisibilityUpdate: (value: CustomFormElementVisibility) => void;
        storedValue:
            | string
            | number
            | boolean
            | number[]
            | string[]
            | ImageField
            | CustomFormElementVisibility
            | FlexConfig
            | null
            | undefined;
        value: | string
        | number
        | boolean
        | number[]
        | string[]
        | ImageField
        | CustomFormElementVisibility
        | FlexConfig;
    }
    Index

    Properties

    handleBooleanUpdate: () => void
    handleDebouncedTextUpdate: (content: string) => void
    handleImageUpdate: (image: ImageField) => void
    handleMultiKeyValueUpdate: (value: KeyValuePair[]) => void
    handleMultiSelectUpdate: (
        selected: MultiSelectOption | MultiSelectOption[] | null,
    ) => void
    handleMultiTextInputUpdate: (value: string[]) => void
    handleTextUpdate: (content: string) => void

    Debounced update callback for text inputs to prevent too many re-renders when typing

    handleUpdate: (content?: string | number | null) => void

    The default, non-debounced handleUpdate callback sets a string or number value

    handleUpdateByField: (field: string, content?: string | number | null) => void

    Requires a field to be passed instead of inferring it from the configSetting

    handleVisibilityUpdate: (value: CustomFormElementVisibility) => void
    storedValue:
        | string
        | number
        | boolean
        | number[]
        | string[]
        | ImageField
        | CustomFormElementVisibility
        | FlexConfig
        | null
        | undefined

    The value as stored in the config, without the setting's defaultValue applied. Use this where a control needs to distinguish "unset" from an explicit value, e.g. colour pickers.

    value:
        | string
        | number
        | boolean
        | number[]
        | string[]
        | ImageField
        | CustomFormElementVisibility
        | FlexConfig