Number
import { buildProperty } from "./builders";
const rangeProperty = buildProperty({ name: "Range", validation: { min: 0, max: 3 }, dataType: "number"});clearable
Section titled “clearable”Add an icon to clear the value and set it to null. Defaults to false
enumValues
Section titled “enumValues”You can use the enum values providing a map of possible exclusive values the property can take, mapped to the label that it is displayed in the dropdown.
import { buildProperty } from "./builders";
const property = buildProperty({ name: "Status", dataType: "number", enumValues: [ buildEnumValueConfig({ id: "-1", label: "Lightly tense", color: "redLighter" }), buildEnumValueConfig({ id: "0", label: "Normal", color: "grayLight" }), buildEnumValueConfig({ id: "1", label: "Lightly relaxed", color: "blueLighter" }) ]});validation
Section titled “validation”requiredShould this field be compulsory.requiredMessageMessage to be displayed as a validation error.minSet the minimum value allowed.maxSet the maximum value allowed.lessThanValue must be less than.moreThanValue must be more than.positiveValue must be a positive number.negativeValue must be a negative number.integerValue must be an integer.
The widgets that get created are
TextFieldBindinggeneric text fieldSelectFieldBindingifenumValuesare set in the string config, this field renders a select where each option is a colored chip.
Links: