Hex Core JS
    Preparing search index...

    Function useInputValueTranslation

    • Handles translation between an input with a semi-independent value from the form state value. Useful if a transformation is applied to the input value before becoming the form state value. For example, converting from a numeric string to a number will truncate trailing zeros after the decimal separator, this hook allows for the input value to contain trailing zeros.

      This is a special version of useInternalValue that works for a single scalar internal value with a text input.

      Type Parameters

      • T

      Parameters

      Returns {
          inputValue: string;
          onBlur: () => void;
          onChange: (
              event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>,
          ) => void;
      }