@@ -136,14 +136,16 @@ class RjvObject extends React.PureComponent {
136136 }
137137
138138 getBraceStart ( object_type , expanded ) {
139- const { src, theme, iconStyle, parent_type } = this . props
139+ const { src, theme, iconStyle, parent_type, displayBraceColon } = this . props
140140
141141 if ( parent_type === 'array_group' ) {
142142 return (
143143 < span >
144- < span { ...Theme ( theme , 'brace' ) } >
145- { object_type === 'array' ? '[' : '{' }
146- </ span >
144+ { displayBraceColon && (
145+ < span { ...Theme ( theme , 'brace' ) } >
146+ { object_type === 'array' ? '[' : '{' }
147+ </ span >
148+ ) }
147149 { expanded ? this . getObjectMetaData ( src ) : null }
148150 </ span >
149151 )
@@ -163,9 +165,11 @@ class RjvObject extends React.PureComponent {
163165 < IconComponent { ...{ theme, iconStyle } } />
164166 </ div >
165167 < ObjectName { ...this . props } />
166- < span { ...Theme ( theme , 'brace' ) } >
167- { object_type === 'array' ? '[' : '{' }
168- </ span >
168+ { displayBraceColon && (
169+ < span { ...Theme ( theme , 'brace' ) } >
170+ { object_type === 'array' ? '[' : '{' }
171+ </ span >
172+ ) }
169173 </ span >
170174 { expanded ? this . getObjectMetaData ( src ) : null }
171175 </ span >
@@ -185,6 +189,7 @@ class RjvObject extends React.PureComponent {
185189 theme,
186190 jsvRoot,
187191 iconStyle,
192+ displayBraceColon,
188193 ...rest
189194 } = this . props
190195
@@ -214,14 +219,16 @@ class RjvObject extends React.PureComponent {
214219 } )
215220 : this . getEllipsis ( ) }
216221 < span class = 'brace-row' >
217- < span
218- style = { {
219- ...Theme ( theme , 'brace' ) . style ,
220- paddingLeft : expanded ? '3px' : '0px'
221- } }
222- >
223- { object_type === 'array' ? ']' : '}' }
224- </ span >
222+ { displayBraceColon && (
223+ < span
224+ style = { {
225+ ...Theme ( theme , 'brace' ) . style ,
226+ paddingLeft : expanded ? '3px' : '0px'
227+ } }
228+ >
229+ { object_type === 'array' ? ']' : '}' }
230+ </ span >
231+ ) }
225232 { expanded ? null : this . getObjectMetaData ( src ) }
226233 </ span >
227234 </ div >
0 commit comments