Skip to content

Commit 2139d97

Browse files
committed
field style added to tree
1 parent c04c6fb commit 2139d97

File tree

1 file changed

+5
-2
lines changed
  • client/packages/lowcoder/src/comps/comps/treeComp

1 file changed

+5
-2
lines changed

client/packages/lowcoder/src/comps/comps/treeComp/treeComp.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { useEffect, useState } from "react";
77
import styled from "styled-components";
88
import ReactResizeDetector from "react-resize-detector";
99
import { StyleConfigType, styleControl } from "comps/controls/styleControl";
10-
import { LabelStyle, TreeStyle } from "comps/controls/styleControlConstants";
10+
import { ComponentStyle, LabelStyle, TreeStyle } from "comps/controls/styleControlConstants";
1111
import { LabelControl } from "comps/controls/labelControl";
1212
import { withDefault } from "comps/generators";
1313
import { 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

8384
const 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

Comments
 (0)