File tree Expand file tree Collapse file tree
packages/@dcl/inspector/src/components/Tree Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,13 +42,12 @@ type Props<T> = {
4242 onDuplicate : ( value : T ) => void
4343 getDragContext ?: ( ) => unknown
4444 dndType ?: string
45- tree ?: unknown
4645}
4746
4847type EmptyString = ''
4948
50- const getDefaultLevel = ( ) => 1
51- const getLevelStyles = ( level : number ) => ( { paddingLeft : `${ ( level - 1 ) * 10 } px` } )
49+ const getDefaultLevel = ( ) => 0
50+ const getLevelStyles = ( level : number ) => ( { paddingLeft : `${ level * 10 } px` } )
5251const getExpandStyles = ( active : boolean ) => ( { height : active ? 'auto' : '0' , overflow : 'hidden' , display : 'block' } )
5352const getEditModeStyles = ( active : boolean ) => ( { display : active ? 'none' : '' } )
5453
@@ -252,13 +251,13 @@ export function Tree<T>() {
252251 < div ref = { ref } style = { getEditModeStyles ( editMode ) } className = "item-area" >
253252 < DisclosureWidget enabled = { enableOpen } isOpen = { open } onOpen = { handleOpen } />
254253 < div onClick = { handleSelect } onContextMenu = { handleSelect } className = "selectable-area" >
255- { props . getIcon ? props . getIcon ( value ) : < > </ > }
254+ { props . getIcon && props . getIcon ( value ) }
256255 < div > { label || id } </ div >
257256 { isEntity && < ActionArea entity = { value as Entity } /> }
258257 </ div >
259258 </ div >
260259 { editMode && typeof label === 'string' && (
261- < EditInput value = { label || '' } onCancel = { quitEditMode } onSubmit = { onChangeEditValue } />
260+ < EditInput value = { label } onCancel = { quitEditMode } onSubmit = { onChangeEditValue } />
262261 ) }
263262 </ div >
264263 < TreeChildren { ...props } />
You can’t perform that action at this time.
0 commit comments