Skip to content

Range

Range element is element with 2 inputs intended for numbers.

TODO dodać screen jak to wygląda, gdy już konfigurator bedzie gotowy

Options

min

float Optional parameter. Parameter represents minimal number from which user can pick number.

max

float Optional parameter. Parameter represents maximum number to which user can pick number.

postfix

string Optional parameter. Parameter represents postfix in inputs.

JSON
{
"options":
    {
      "min" : 1,
      "max" : 15,
      "postfix" : "%"
    }
}

Build-in Validators

Element validates if given values are numbers. When you pass min and max option it will be checked if values are between.

Available Validators

Element does not have available validators.

Relations Support

Element does not support relations between elements.

Configuration output schema

schema
{
  "<element_type>" : "range",
  "<element_name>" : string,
  "<element_label>" : string,
  "<element_labelDescription>" : string,
  "<element_isRequired>" : bool,
  "<element_isHidden>" : bool,
  "<element_defaultValue>" : string,
  "<element_options>" : {
    "<element_options_min>" : float,
    "<element_options_max>" : float,
    "<element_options_postfix>" : string,
  }
}
example
{
  "type" : "range",
  "name" : "range_promotions",
  "label" : "Pick range of % promotions",
  "isRequired" : true,
  "isHidden" : false,
  "defaultValue" : [2, 7],
  "options":
  {
    "min" : 1,
    "max" : 15,
    "postfix" : "%"
  }
}