diff --git a/README.md b/README.md index 5a90eb9..e95bc2c 100644 --- a/README.md +++ b/README.md @@ -1,34 +1,47 @@ # Umbraco Nullable Types Property editors which enable a null value to be selected in preference to a default value. -## _Nullable String_ -'But strings are always nullable !' however with a textbox alone there's no way to distinguish between whitespace and null, -so this data-type adds a checkbox to toggle between the textbox value and a null. -The raw values are stored as json, but will also read in raw string values (as stored by the built-in textstring data-type, so can migrate away from this, but not return if item has been saved). -The property-value-converter will return a string. +## _Nullable Boolean_ +A tri-state data-type where the default value is null. +The raw values are stored as strings: "", "0" or "1", which makes it compatable with the built-in true/false data-type. +The property-value-converter will return a nullable bool. ### Property Editor -![Property Editor Example](docs/NullableStringPropertyEditor.png) +![Property Editor Example](docs/NullableBooleanPropertyEditor.png) ### Property Editor Configuration -![Property Editor Configuration Example](docs/NullableStringPropertyEditorConfiguration.png) +![Property Editor Configuration Example](docs/NullableBooleanPropertyEditorConfiguration.png) -## _Nullable Boolean_ -A tri-state data-type where the default value is null. +## _Nullable Integer_ +Based on the built-in numeric data-type, this adds a checkbox to toggle between the integer value and a null. +The property-value-converter will return a nullable integer. -The raw values are stored as strings: "", "0" or "1", which makes it compatable with the built-in true/false data-type. -The property-value-converter will return a nullable bool. +### Property Editor + +![Property Editor Example](docs/NullableIntegerPropertyEditor.png) + +### Property Editor Configuration + +![Property Editor Configuration Example](docs/NullableIntegerPropertyEditorConfiguration.png) + + +## _Nullable String_ +'But strings are always nullable !' however with a textbox alone there's no way to distinguish between whitespace and null, +so this data-type adds a checkbox to toggle between the textbox value and a null. + +The raw values are stored as json, but will also read in raw string values (as stored by the built-in textstring data-type, so can migrate away from this, but not return if item has been saved). +The property-value-converter will return a string. ### Property Editor -![Property Editor Example](docs/NullableBooleanPropertyEditor.png) +![Property Editor Example](docs/NullableStringPropertyEditor.png) ### Property Editor Configuration -![Property Editor Configuration Example](docs/NullableBooleanPropertyEditorConfiguration.png) +![Property Editor Configuration Example](docs/NullableStringPropertyEditorConfiguration.png) diff --git a/docs/NullableIntegerPropertyEditor.png b/docs/NullableIntegerPropertyEditor.png new file mode 100644 index 0000000..67015fd Binary files /dev/null and b/docs/NullableIntegerPropertyEditor.png differ diff --git a/docs/NullableIntegerPropertyEditorConfiguration.png b/docs/NullableIntegerPropertyEditorConfiguration.png new file mode 100644 index 0000000..967c2c9 Binary files /dev/null and b/docs/NullableIntegerPropertyEditorConfiguration.png differ diff --git a/docs/NullableStringPropertyEditorConfiguration.png b/docs/NullableStringPropertyEditorConfiguration.png index 2b186a2..4b05274 100644 Binary files a/docs/NullableStringPropertyEditorConfiguration.png and b/docs/NullableStringPropertyEditorConfiguration.png differ