File tree Expand file tree Collapse file tree 3 files changed +19
-9
lines changed
apps/docs/src/content/docs/api-reference Expand file tree Collapse file tree 3 files changed +19
-9
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @sjsf/form " : minor
3+ ---
4+
5+ Allow to augment ` InputAttributes ` type
Original file line number Diff line number Diff line change @@ -31,10 +31,13 @@ Root node of UI schema can have an additional fields:
3131## UI options
3232
3333``` typescript
34- type InputAttributes =
35- | HTMLInputAttributes
36- | HTMLTextareaAttributes
37- | HTMLSelectAttributes
34+ interface Inputs {
35+ input: HTMLInputAttributes ;
36+ textarea: HTMLTextareaAttributes ;
37+ select: HTMLSelectAttributes ;
38+ }
39+
40+ type InputAttributes = Inputs [keyof Inputs ];
3841
3942interface UiOptions {
4043 /**
Original file line number Diff line number Diff line change @@ -47,11 +47,13 @@ interface UiSchemaContent {
4747 additionalItems ?: UiSchema ;
4848}
4949
50- // TODO: Omit non serializable properties
51- export type InputAttributes =
52- | HTMLInputAttributes
53- | HTMLTextareaAttributes
54- | HTMLSelectAttributes ;
50+ export interface Inputs {
51+ input : HTMLInputAttributes ;
52+ textarea : HTMLTextareaAttributes ;
53+ select : HTMLSelectAttributes ;
54+ }
55+
56+ export type InputAttributes = Inputs [ keyof Inputs ] ;
5557
5658export interface UiOptions {
5759 /**
You can’t perform that action at this time.
0 commit comments