Hex Core JS
    Preparing search index...

    Type Alias UseInternalValueArgs<E, I>

    type UseInternalValueArgs<E, I> = {
        externalValue: E;
        onBlur?: () => void;
        setExternalValue: (externalValue: E) => void;
        sideEffect?: (externalValue: E) => void;
        toExternalValue: (internalValue: I) => E;
        toInitialInternalValue?: (externalValue: E) => I;
        toInternalValue: (externalValue: E) => I;
    }

    Type Parameters

    • E
    • I
    Index

    Properties

    externalValue: E

    The external value.

    onBlur?: () => void

    The base onBlur function, will be wrapped by the returned onBlur function.

    setExternalValue: (externalValue: E) => void

    The set state function for the external value.

    sideEffect?: (externalValue: E) => void

    The sideEffect function to call when the base value changes due to a change in the input.

    toExternalValue: (internalValue: I) => E

    Convert from the internal value to the external value.

    toInitialInternalValue?: (externalValue: E) => I

    Convert from the external value to the internal value the first time.

    toInternalValue: (externalValue: E) => I

    Convert from the external value to the internal value.