Kvaser CanKing GUI Extensions SDK - v7.3.0
    Preparing search index...

    Interface NumberRangeControlProps

    Properties of the NumberRangeControl React component.

    interface NumberRangeControlProps {
        lowerLimit?: number;
        maxDisabled?: boolean;
        maxError?: boolean;
        maxValue: string;
        minDisabled?: boolean;
        minError?: boolean;
        minValue: string;
        onBlur?: (newMinValue: string, newMaxValue: string) => void;
        onChange?: (newMinValue: string, newMaxValue: string) => void;
        onMaxErrorChange?: (errors: boolean) => void;
        onMaxValidate?: (
            value: string,
            trigger: "change" | "blur",
        ) => { err: boolean; val: string };
        onMinErrorChange?: (errors: boolean) => void;
        onMinValidate?: (
            value: string,
            trigger: "change" | "blur",
        ) => { err: boolean; val: string };
        unit?: string;
        upperLimit?: number;
    }
    Index

    Properties

    lowerLimit?: number

    Lower value limit.

    maxDisabled?: boolean

    Set to true to disable the max value field.

    maxError?: boolean

    The current max error state.

    maxValue: string

    The max value.

    minDisabled?: boolean

    Set to true to disable the min value field.

    minError?: boolean

    The current min error state.

    minValue: string

    The min value.

    onBlur?: (newMinValue: string, newMaxValue: string) => void

    Callback that is called on a blur event.

    Type Declaration

      • (newMinValue: string, newMaxValue: string): void
      • Parameters

        • newMinValue: string

          The new min value.

        • newMaxValue: string

          The new max value.

        Returns void

    onChange?: (newMinValue: string, newMaxValue: string) => void

    Callback that is called on a change event.

    Type Declaration

      • (newMinValue: string, newMaxValue: string): void
      • Parameters

        • newMinValue: string

          The new min value.

        • newMaxValue: string

          The new max value.

        Returns void

    onMaxErrorChange?: (errors: boolean) => void

    Callback that is called when the max errors state has changed.

    Type Declaration

      • (errors: boolean): void
      • Parameters

        • errors: boolean

          The new max errors state.

        Returns void

    onMaxValidate?: (
        value: string,
        trigger: "change" | "blur",
    ) => { err: boolean; val: string }

    Callback that will be called when the value has been changed or the control has lost focus. This callback is called before onChange and if the returned err value is true then onChange won't be called. The implemtation of this callback is allowed to modify the specified value and return the modified value in the val property of the returned object.

    Type Declaration

      • (value: string, trigger: "change" | "blur"): { err: boolean; val: string }
      • Parameters

        • value: string

          The new text value.

        • trigger: "change" | "blur"

          The trigger of this callback, either on 'change' or on 'blur'.

        Returns { err: boolean; val: string }

        An object with the validated text value (val) and an error state (err).

    onMinErrorChange?: (errors: boolean) => void

    Callback that is called when the min errors state has changed.

    Type Declaration

      • (errors: boolean): void
      • Parameters

        • errors: boolean

          The new min errors state.

        Returns void

    onMinValidate?: (
        value: string,
        trigger: "change" | "blur",
    ) => { err: boolean; val: string }

    Callback that will be called when the value has been changed or the control has lost focus. This callback is called before onChange and if the returned err value is true then onChange won't be called. The implemtation of this callback is allowed to modify the specified value and return the modified value in the val property of the returned object.

    Type Declaration

      • (value: string, trigger: "change" | "blur"): { err: boolean; val: string }
      • Parameters

        • value: string

          The new text value.

        • trigger: "change" | "blur"

          The trigger of this callback, either on 'change' or on 'blur'.

        Returns { err: boolean; val: string }

        An object with the validated text value (val) and an error state (err).

    unit?: string

    A unit text that will be displayed next to the values.

    upperLimit?: number

    Upper value limit.