Skip to main content

stepper_disabled

Function stepper_disabled 

Source
pub fn stepper_disabled(
    current: i64,
    step: i64,
    min: Option<i64>,
    max: Option<i64>,
) -> bool
Expand description

Returns whether a stepper button has to be rendered as inert.

The stepper is inert when the step would carry the value past one of its bounds, which is exactly the case where stepped_value yields None.

§Arguments

  • i64 - The current value of the field.
  • Option<i64> - The inclusive lower bound, or None for no bound.

§Returns

  • bool - true when the stepper cannot move the value.