File tree Expand file tree Collapse file tree 2 files changed +8
-10
lines changed
templates/next/components/foo Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -122,12 +122,10 @@ export default class NextGenerator extends BaseGenerator {
122
122
return {
123
123
...list ,
124
124
[ field . name ] : {
125
- notrequired : ! field . required ,
126
- name : field . name ,
125
+ ...field ,
127
126
type : this . getType ( field ) ,
128
127
description : this . getDescription ( field ) ,
129
128
readonly : false ,
130
- reference : field . reference ,
131
129
} ,
132
130
} ;
133
131
} , { } ) ;
Original file line number Diff line number Diff line change @@ -25,6 +25,8 @@ export const Form: FunctionComponent<Props> = ({ {{{lc}}} }) => {
25
25
}
26
26
} ;
27
27
28
+ const renderForm
29
+
28
30
return (
29
31
< div >
30
32
< h1 > { { { { lc} } } ? `Edit {{{ucf}}} ${ { { ~ lc } }['@id']}` : `Create {{{ucf}}}` } </ h1 >
@@ -84,14 +86,13 @@ export const Form: FunctionComponent<Props> = ({ {{{lc}}} }) => {
84
86
onChange = { handleChange }
85
87
onBlur = { handleBlur }
86
88
/>
89
+ < ErrorMessage
90
+ className = "invalid-feedback"
91
+ component = "div"
92
+ name = "{{name}}"
93
+ />
87
94
</ div >
88
- < ErrorMessage
89
- className = "text-danger"
90
- component = "div"
91
- name = "{{name}}"
92
- />
93
95
{ { / each} }
94
-
95
96
{ status && status . msg && (
96
97
< div
97
98
className = { `alert ${
@@ -102,7 +103,6 @@ export const Form: FunctionComponent<Props> = ({ {{{lc}}} }) => {
102
103
{ status . msg }
103
104
</ div >
104
105
) }
105
-
106
106
< button
107
107
type = "submit"
108
108
className = "btn btn-success"
You can’t perform that action at this time.
0 commit comments