Skip to content

Commit

Permalink
fix: 修复数据绑定组件选中值回传不正确的问题(#11126) (#11127)
Browse files Browse the repository at this point in the history
Co-authored-by: chenfan02 <chenfan02@baidu.com>
  • Loading branch information
franckchen and chenfan02 authored Oct 30, 2024
1 parent 0ede261 commit 887d860
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/amis-editor/src/renderer/DataBindingControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ export class DataBindingControl extends React.Component<

return render('content', schema!, {
onSelect: onChange,
value: value ? value.value : result
value:
value && typeof value === 'object'
? value?.selected?.value ?? value?.value
: result
});
}}
value={result}
Expand Down

0 comments on commit 887d860

Please # to comment.