Kvaser CanKing GUI Extensions SDK v7.4.0
Kvaser CanKing GUI Extensions SDK / controls / NumberRangeControlProps
Interface: NumberRangeControlProps
Properties of the NumberRangeControl React component.
Properties
lowerLimit?
optionallowerLimit:number
Lower value limit.
maxDisabled?
optionalmaxDisabled:boolean
Set to true to disable the max value field.
maxError?
optionalmaxError:boolean
The current max error state.
maxValue
maxValue:
string
The max value.
minDisabled?
optionalminDisabled:boolean
Set to true to disable the min value field.
minError?
optionalminError:boolean
The current min error state.
minValue
minValue:
string
The min value.
onBlur()?
optionalonBlur: (newMinValue,newMaxValue) =>void
Callback that is called on a blur event.
Parameters
newMinValue
string
The new min value.
newMaxValue
string
The new max value.
Returns
void
onChange()?
optionalonChange: (newMinValue,newMaxValue) =>void
Callback that is called on a change event.
Parameters
newMinValue
string
The new min value.
newMaxValue
string
The new max value.
Returns
void
onMaxErrorChange()?
optionalonMaxErrorChange: (errors) =>void
Callback that is called when the max errors state has changed.
Parameters
errors
boolean
The new max errors state.
Returns
void
onMaxValidate()?
optionalonMaxValidate: (value,trigger) =>object
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.
Parameters
value
string
The new text value.
trigger
The trigger of this callback, either on ‘change’ or on ‘blur’.
"change" | "blur"
Returns
object
An object with the validated text value (val) and an error state (err).
err
err:
boolean
val
val:
string
onMinErrorChange()?
optionalonMinErrorChange: (errors) =>void
Callback that is called when the min errors state has changed.
Parameters
errors
boolean
The new min errors state.
Returns
void
onMinValidate()?
optionalonMinValidate: (value,trigger) =>object
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.
Parameters
value
string
The new text value.
trigger
The trigger of this callback, either on ‘change’ or on ‘blur’.
"change" | "blur"
Returns
object
An object with the validated text value (val) and an error state (err).
err
err:
boolean
val
val:
string
unit?
optionalunit:string
A unit text that will be displayed next to the values.
upperLimit?
optionalupperLimit:number
Upper value limit.