You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,9 +6,13 @@ forms with automatic insert and update events, and automatic reactive validation
6
6
7
7
## Change Log
8
8
9
+
### 5.5.0
10
+
11
+
For `boolean-radios` and `boolean-select` input types, you can now use the `nullLabel` attribute to specify a label (e.g., "None") for when the value is not set (or to unset it). For backwards compatibility, the `boolean-radios` type will not render a radio element for unsetting unless you set `nullLabel`.
12
+
9
13
### 5.4.1
10
14
11
-
*Fix `AutoForm.getFieldValue` so that it reacts properly when first called outside of the form, before the form has been rendered. Also attempt to limit unnecessary reruns.
15
+
Fix `AutoForm.getFieldValue` so that it reacts properly when first called outside of the form, before the form has been rendered. Also attempt to limit unnecessary reruns.
Copy file name to clipboardExpand all lines: README.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -451,7 +451,7 @@ If you don't include a `type` attribute, the following logic is used to automati
451
451
* Otherwise if the schema type is `String` and you include the `rows` attribute, a `textarea` is used.
452
452
* Otherwise if the schema type is `Number`, a `number` type is used.
453
453
* Otherwise if the schema type is `Date`, a `date` type is used.
454
-
* Otherwise if the schema type is `Boolean`, the `boolean-checkbox` type is used. You may want to specify a `type` of `boolean-radios` or `boolean-select` instead. If you do so, use the `trueLabel`and `falseLabel` attributes to set the labels used in the radio or select control.
454
+
* Otherwise if the schema type is `Boolean`, the `boolean-checkbox` type is used. You may want to specify a `type` of `boolean-radios` or `boolean-select` instead. If you do so, use the `trueLabel`, `falseLabel`, and `nullLabel` attributes to set the labels used in the radio or select control.
455
455
* Otherwise a `text` type is used.
456
456
457
457
The following attributes are recognized:
@@ -473,6 +473,7 @@ to `true` to render radios or checkboxes for the `options` instead of `select`.
473
473
option for an input with type `boolean-select` or `boolean-radios`.
474
474
*`falseLabel`: Set to the string that should be used as the label for the `false`
475
475
option for an input with type `boolean-select` or `boolean-radios`.
476
+
*`nullLabel`: Set to the string that should be used as the label for the empty value option for an input with type `boolean-select` or `boolean-radios`.
476
477
*`value`: Set a specific, potentially reactive, value for the input. If you have also provided a `doc` attribute on the `autoForm` or `quickForm`, this value will override the value from the `doc` object.
477
478
*`defaultValue`: Set a reactive default value for the input. If you have also provided a `doc` attribute on the `autoForm` or `quickForm`, this value will be used only when the `doc` object has no value for this field. This takes precedence over the `defaultValue` property of the field's schema. (Also, `defaultValue` from the schema is slightly different in that it is never used if you provide a `doc` attribute.)
478
479
* Any additional attributes are passed along to the generated DOM element, meaning that you can add `class`, etc. When providing a boolean attribute, set it to `true` (no quotation marks) or a helper that returns `true`.
0 commit comments