Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add missing doc of defaultValue option in Table columns configuration #849

Merged
merged 1 commit into from
Jun 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions doc/scenarioParametersConfiguration.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ parameters:
- 'int'
minValue: 0
maxValue: 120
defaultValue: 60
- field: 'birthday'
type:
- 'date'
Expand Down Expand Up @@ -321,11 +322,12 @@ The description of the table columns consists of an array of objects with the fo
- **nonSortable** (_behavior_)
- **minValue** (_optional_) minimum value accepted on edition (for column types _int_, _number_ and _date_)\*
- **maxValue** (_optional_) maximum value accepted on edition (for column types _int_, _number_ and _date_)\*
- **defaultValue** (_optional_) default value to use when users add new lines; if no default value is defined, the webapp will choose a default value **based on the column type**.
- **enumValues** (_optional_) list of known enum values, accepted on edition (for column type _enum_)
- **acceptsEmptyFields** (_optional_) set to `true`, authorizes the column to accept empty fields (default `false`)

\* _minValue_ and _maxValue_ specified for a column with the _date_ type will be provided to the standard JS Date
constructor, mind the date format (ISO format is recommended)
For columns of type `date`, when providing values for the options `minValue`, `maxValue` and `defaultValue`,
the **ISO format** is recommended (these values will be forwarded to the standard JS `Date` constructor).

Example:

Expand All @@ -350,6 +352,7 @@ parameters:
type:
- 'int'
minValue: 0
defaultValue: 60
maxValue: 120
acceptsEmptyFields: true
- field: 'canDrinkAlcohol'
Expand All @@ -358,6 +361,7 @@ parameters:
- field: 'favoriteDrink'
type:
- 'enum'
defaultValue: 'OrangeJuice'
enumValues:
- 'AppleJuice'
- 'Beer'
Expand Down
Loading