@@ -7,7 +7,7 @@ import { useEffect, useState } from "react";
77import styled from "styled-components" ;
88import ReactResizeDetector from "react-resize-detector" ;
99import { StyleConfigType , styleControl } from "comps/controls/styleControl" ;
10- import { LabelStyle , TreeStyle } from "comps/controls/styleControlConstants" ;
10+ import { ComponentStyle , LabelStyle , TreeStyle } from "comps/controls/styleControlConstants" ;
1111import { LabelControl } from "comps/controls/labelControl" ;
1212import { withDefault } from "comps/generators" ;
1313import { dropdownControl } from "comps/controls/dropdownControl" ;
@@ -77,7 +77,8 @@ const childrenMap = {
7777 // TODO: more event
7878 onEvent : SelectEventHandlerControl ,
7979 style : styleControl ( TreeStyle ) ,
80- labelStyle : styleControl ( LabelStyle . filter ( ( style ) => [ 'accent' , 'validate' ] . includes ( style . name ) === false ) )
80+ labelStyle : styleControl ( LabelStyle . filter ( ( style ) => [ 'accent' , 'validate' ] . includes ( style . name ) === false ) ) ,
81+ field :styleControl ( ComponentStyle )
8182} ;
8283
8384const TreeCompView = ( props : RecordConstructorToView < typeof childrenMap > ) => {
@@ -98,6 +99,7 @@ const TreeCompView = (props: RecordConstructorToView<typeof childrenMap>) => {
9899 ...selectInputValidate ( props ) ,
99100 style,
100101 labelStyle,
102+ field :props . field ,
101103 children : (
102104 < ReactResizeDetector onResize = { ( w , h ) => setHeight ( h ) } >
103105 < Container { ...style } >
@@ -184,6 +186,7 @@ let TreeBasicComp = (function () {
184186 < >
185187 < Section name = { sectionNames . style } > { children . style . getPropertyView ( ) } </ Section >
186188 < Section name = { sectionNames . labelStyle } > { children . labelStyle . getPropertyView ( ) } </ Section >
189+ < Section name = { sectionNames . field } > { children . field . getPropertyView ( ) } </ Section >
187190 </ >
188191 ) }
189192 </ >
0 commit comments