-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: formats value prop as code (#2692)
- Loading branch information
Showing
1 changed file
with
25 additions
and
25 deletions.
There are no files selected for viewing
50 changes: 25 additions & 25 deletions
50
...stem-portal/src/docs/uilib/extensions/forms/data-value-readwrite-properties.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
### Standard data value component props | ||
|
||
| Property | Type | Description | | ||
| ---------------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | ||
| `className` | `string` | _(optional)_ Outer DOM element class name | | ||
| `value` | {props.type} | _(optional)_ Source data value for the input | | ||
| `layout` | `string` | _(optional)_ Layout for the label and input. Can be `horizontal` or `vertical` | | ||
| `label` | `string` | _(optional)_ Field label to show above / before the input feature | | ||
| `labelDescription` | `string` | _(optional)_ A more discreet text displayed beside the label (i.e for "(optional)") | | ||
| `labelSecondary` | `string` | _(optional)_ Secondary information displayed at the end of the label line (i.e character counter) | | ||
| `placeholder` | `string` | _(optional)_ Text showing in place of the value if no value is given | | ||
| `path` | `string` | _(optional)_ JSON Pointer for where the data for this input is located in the source dataset (when using DataContext) | | ||
| `info` | `Error` or `string` | _(optional)_ Info message shown below / after the input | | ||
| `warning` | `Error` or `string` | _(optional)_ Warning message shown below / after the input | | ||
| `error` | `Error` | _(optional)_ Error message shown below / after the input | | ||
| `disabled` | `boolean` | _(optional)_ Set `true` to show the field but without the possibility of changing the value. | | ||
| `emptyValue` | `any` | _(optional)_ The value to use (in `onChange` events etc) when emptying the field. Makes it possible for instance to provide `undefined` instead of an empty string when clearing the content of a text input. | | ||
| `required` | `boolean` | _(optional)_ When set `true`, the input will give an error if the value cannot be empty. | | ||
| `schema` | `object` | _(optional)_ Custom JSON Schema for validating the value. | | ||
| `validateInitially` | `string` | _(optional)_ Set true to show validation based errors initially (from given value-prop or source data) before the user interacts with the field. | | ||
| `validateUnchanged` | `string` | _(optional)_ Set true to show validation based errors when the field is touched (like focusing a field and blurring) without having changed the value. Since the user did not introduce a new error, this will apply when the value was initially invalid based on validation. | | ||
| `continuousValidation` | `string` | _(optional)_ Set true to show validation based errors continuously while writing, not just when blurring the field. | | ||
| `errorMessages` | `object` | _(optional)_ Custom error messages for each type of error, overriding default messages. | | ||
| `validator` | `function` | _(optional)_ Custom validator function that will be called for every change done by the user. Can be asynchronous or synchronous. | | ||
| `onBlurValidator` | `function` | _(optional)_ Custom validator function that will be called when the user leaves the field (blurring a text input, closing a dropdown etc). Can be asynchronous or synchronous. | | ||
| `toInput` | `function` | _(optional)_ Derivate called when the received / active value is sent to the input. Can be used for casting, changing syntax etc. | | ||
| `fromInput` | `function` | _(optional)_ Derivate called when changes is made by the user, to cast or change syntax back to the original (opposite of `toInput`). | | ||
| Property | Type | Description | | ||
| ---------------------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | ||
| `className` | `string` | _(optional)_ Outer DOM element class name | | ||
| `value` | {<code>{props.type}</code>} | _(optional)_ Source data value for the input | | ||
| `layout` | `string` | _(optional)_ Layout for the label and input. Can be `horizontal` or `vertical` | | ||
| `label` | `string` | _(optional)_ Field label to show above / before the input feature | | ||
| `labelDescription` | `string` | _(optional)_ A more discreet text displayed beside the label (i.e for "(optional)") | | ||
| `labelSecondary` | `string` | _(optional)_ Secondary information displayed at the end of the label line (i.e character counter) | | ||
| `placeholder` | `string` | _(optional)_ Text showing in place of the value if no value is given | | ||
| `path` | `string` | _(optional)_ JSON Pointer for where the data for this input is located in the source dataset (when using DataContext) | | ||
| `info` | `Error` or `string` | _(optional)_ Info message shown below / after the input | | ||
| `warning` | `Error` or `string` | _(optional)_ Warning message shown below / after the input | | ||
| `error` | `Error` | _(optional)_ Error message shown below / after the input | | ||
| `disabled` | `boolean` | _(optional)_ Set `true` to show the field but without the possibility of changing the value. | | ||
| `emptyValue` | `any` | _(optional)_ The value to use (in `onChange` events etc) when emptying the field. Makes it possible for instance to provide `undefined` instead of an empty string when clearing the content of a text input. | | ||
| `required` | `boolean` | _(optional)_ When set `true`, the input will give an error if the value cannot be empty. | | ||
| `schema` | `object` | _(optional)_ Custom JSON Schema for validating the value. | | ||
| `validateInitially` | `string` | _(optional)_ Set true to show validation based errors initially (from given value-prop or source data) before the user interacts with the field. | | ||
| `validateUnchanged` | `string` | _(optional)_ Set true to show validation based errors when the field is touched (like focusing a field and blurring) without having changed the value. Since the user did not introduce a new error, this will apply when the value was initially invalid based on validation. | | ||
| `continuousValidation` | `string` | _(optional)_ Set true to show validation based errors continuously while writing, not just when blurring the field. | | ||
| `errorMessages` | `object` | _(optional)_ Custom error messages for each type of error, overriding default messages. | | ||
| `validator` | `function` | _(optional)_ Custom validator function that will be called for every change done by the user. Can be asynchronous or synchronous. | | ||
| `onBlurValidator` | `function` | _(optional)_ Custom validator function that will be called when the user leaves the field (blurring a text input, closing a dropdown etc). Can be asynchronous or synchronous. | | ||
| `toInput` | `function` | _(optional)_ Derivate called when the received / active value is sent to the input. Can be used for casting, changing syntax etc. | | ||
| `fromInput` | `function` | _(optional)_ Derivate called when changes is made by the user, to cast or change syntax back to the original (opposite of `toInput`). | |