Skip to main content

Number Value Model

The number value model describes a number value. The value is always number. If the value is empty then it's 0 or NaN.

Example

Check the Editors Example.

Configuration

import { createNumberValueModel } from 'sequential-workflow-editor-model';

builder
.property('foo')
.value(
createNumberValueModel({
defaultValue: 128,
min: 8,
max: 1024
})
);

Optional properties:

  • defaultValue - the default value,
  • min - the minimum value,
  • max - the maximum value.

Value Reading

To read the value you just need to read the property value:

const value: number = stepOrRoot.properties['foo']; // number