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 {
122122 return {
123123 ...list ,
124124 [ field . name ] : {
125- notrequired : ! field . required ,
126- name : field . name ,
125+ ...field ,
127126 type : this . getType ( field ) ,
128127 description : this . getDescription ( field ) ,
129128 readonly : false ,
130- reference : field . reference ,
131129 } ,
132130 } ;
133131 } , { } ) ;
Original file line number Diff line number Diff line change @@ -25,6 +25,8 @@ export const Form: FunctionComponent<Props> = ({ {{{lc}}} }) => {
2525 }
2626 } ;
2727
28+ const renderForm
29+
2830 return (
2931 < div >
3032 < h1 > { { { { lc} } } ? `Edit {{{ucf}}} ${ { { ~ lc } }['@id']}` : `Create {{{ucf}}}` } </ h1 >
@@ -84,14 +86,13 @@ export const Form: FunctionComponent<Props> = ({ {{{lc}}} }) => {
8486 onChange = { handleChange }
8587 onBlur = { handleBlur }
8688 />
89+ < ErrorMessage
90+ className = "invalid-feedback"
91+ component = "div"
92+ name = "{{name}}"
93+ />
8794 </ div >
88- < ErrorMessage
89- className = "text-danger"
90- component = "div"
91- name = "{{name}}"
92- />
9395 { { / each} }
94-
9596 { status && status . msg && (
9697 < div
9798 className = { `alert ${
@@ -102,7 +103,6 @@ export const Form: FunctionComponent<Props> = ({ {{{lc}}} }) => {
102103 { status . msg }
103104 </ div >
104105 ) }
105-
106106 < button
107107 type = "submit"
108108 className = "btn btn-success"
You can’t perform that action at this time.
0 commit comments