File tree 2 files changed +11
-1
lines changed
@sanity/form-builder/src/inputs/Object
2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,10 @@ export default class ObjectInput extends React.PureComponent {
61
61
}
62
62
63
63
renderField ( field , level , index ) {
64
+ if ( field . type . hidden ) {
65
+ return null
66
+ }
67
+
64
68
const { value, validation, autoFocus} = this . props
65
69
const fieldValidation = validation && validation . fields [ field . name ]
66
70
@@ -141,7 +145,6 @@ export default class ObjectInput extends React.PureComponent {
141
145
}
142
146
143
147
render ( ) {
144
-
145
148
const { type, level} = this . props
146
149
147
150
const renderedFields = this . getRenderedFields ( )
Original file line number Diff line number Diff line change @@ -23,6 +23,13 @@ export default {
23
23
title : 'Author' ,
24
24
type : 'reference' ,
25
25
to : { type : 'author' , title : 'Author' }
26
+ } ,
27
+ {
28
+ name : 'isbn' ,
29
+ title : 'ISBN number' ,
30
+ description : 'ISBN-number of the book. Not shown in studio.' ,
31
+ type : 'number' ,
32
+ hidden : true
26
33
}
27
34
]
28
35
}
You can’t perform that action at this time.
0 commit comments