You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
在2.0中扩展一个tree的组件,将选中的值传递给onChange事件,selectedKeys为数组类型。
export const AntdTree = connect(
observer((props: any) => {
......
const onSelect = (selectedKeys, e) => {
if (onChange) {
onChange(selectedKeys);
}
};
......
}
在表单的effects中获取:
onFormInputChange((form) => {
console.log(form.getFormState().values) //获取为:tree: ["2"]
console.log(form.values) //获取为:Proxy {Symbol(mobx administration): ObservableObjectAdministration}
});
Beta Was this translation helpful? Give feedback.
All reactions