@@ -57,7 +57,7 @@ export type UiSchemaRoot = UiSchemaDefinition & {
57
57
```
58
58
## Evaluation rules
59
59
60
- Usually ui schema corresponds to the data structure described by json schema.
60
+ Usually UI schema corresponds to the data structure described by json schema.
61
61
62
62
For example, with this JSON schema, the following UI schema would be correct:
63
63
@@ -88,12 +88,12 @@ for the value of the `$ref` key, other fields will be ignored.
88
88
89
89
### Array
90
90
91
- Instead of defining indices in the ui schema, the ` items ` keyword should be used
92
- to specify the ui schema for the elements of the array.
91
+ Instead of defining indices in the UI schema, the ` items ` keyword should be used
92
+ to specify the UI schema for the elements of the array.
93
93
94
94
For a fixed array ` items ` also can be an array.
95
95
If you have additional items you should use ` additionalItems ` keyword
96
- to specify the ui schema for them.
96
+ to specify the UI schema for them.
97
97
98
98
```
99
99
{
@@ -104,24 +104,46 @@ to specify the ui schema for them.
104
104
105
105
### Object
106
106
107
- You should use ` additionalProperties ` keyword to specify the ui schema for
107
+ You should use ` additionalProperties ` keyword to specify the UI schema for
108
108
additional properties.
109
109
110
- You can use ` additionalPropertyKeyInput ` keyword to define an ui schema for
110
+ You can use ` additionalPropertyKeyInput ` keyword to define an UI schema for
111
111
the additional property key input field.
112
112
113
113
### oneOf/anyOf
114
114
115
- You can define separate ui schemas for each ` oneOf/anyOf ` branch
116
- using the corresponding keyword in the ui schema.
117
- Otherwise the ui schema of the current field will be used.
115
+ You can define separate UI schemas for each ` oneOf/anyOf ` branch
116
+ using the corresponding keyword in the UI schema.
117
+ Otherwise the UI schema of the current field will be used.
118
118
119
119
```
120
120
{
121
121
oneOf: [<uiSchema>, ...]
122
122
}
123
123
```
124
124
125
+ ## UI components
126
+
127
+ Using the ` ui:components ` property, you can replace any
128
+ [ form component] ( ../theme/#component-types ) with a compatible one
129
+ using the name of the connected component or
130
+ the component itself directly.
131
+
132
+ Component ` A ` is compatible with component ` B ` if the properties and bindings
133
+ of component ` B ` extend the properties and bindings of component ` A ` .
134
+
135
+ ``` ts
136
+ export type CompatibleComponentType <T extends ComponentType > = {
137
+ [C in ComponentType ]: Expand <ComponentProps [T ]> extends Expand <
138
+ ComponentProps [C ]
139
+ >
140
+ ? ComponentBindings [T ] extends ComponentBindings [C ]
141
+ ? C
142
+ : never
143
+ : never ;
144
+ }[ComponentType ];
145
+ ```
146
+
125
147
## UI options
126
148
127
149
The ` UiOptions ` type is an extensible set of components options. By default it
0 commit comments