Skip to content

Commit

Permalink
fix(setter): initial bug (#140)
Browse files Browse the repository at this point in the history
* fix(setter): initial bugs

* fix(setter): initial bugs
  • Loading branch information
BubblyFace authored Nov 28, 2021
1 parent 0bcb178 commit 4b72dfe
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions formily/setters/src/components/DataSourceSetter/TreePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ export const TreePanel: React.FC<ITreePanelProps> = observer((props) => {
onClick={() => {
const uuid = uid()
const dataSource = props.treeDataSource.dataSource
const initialKeyValuePairs = props.defaultOptionValue || [
const initialKeyValuePairs = props.defaultOptionValue.map(
(item) => ({ ...item })
) || [
{
label: 'label',
value: `${GlobalRegistry.getDesignerMessage(
Expand All @@ -115,7 +117,7 @@ export const TreePanel: React.FC<ITreePanelProps> = observer((props) => {
<Tree
blockNode
draggable={true}
allowDrop={props.allowTree ? null : limitTreeDrag}
allowDrop={props.allowTree ? () => true : limitTreeDrag}
defaultExpandAll
defaultExpandParent
autoExpandParent
Expand Down

0 comments on commit 4b72dfe

Please sign in to comment.