We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
如图所示,目前可以获取到checked的value,但获取不到父级节点的value(也就是halfChecked),以下是onchange打印的
halfChecked是没数据的,label居然也是null的,下面是我组件配置的示例代码
// 组件配置 <ProFormTreeSelect name="menu_ids" label={<FormattedMessage id={locales.pageSystemRoleDetailMenu} />} fieldProps={{ virtual: false, treeLine: true, treeNodeFilterProp: 'title', showSearch: true, filterTreeNode: true, labelInValue: true, treeCheckStrictly: false, treeCheckable: true, showCheckedStrategy: TreeSelect.SHOW_ALL, onChange: (value, label) => { console.log('change', value, label); }, }} request={async () => { const result = await getMenuManagementList({}); return convertToTreeFormat(result.data); }} /> // 转换动态数据convertToTreeFormat export function convertToTreeFormat(data: SystemType.Menu[]): TreeNode[] { return data.map((item) => ({ title: item.menu_names[currentLang] || item.menu_names['en'], value: item.id, key: item.id, children: item.children ? convertToTreeFormat(item.children) : undefined, })); }
请问TreeSelect这个组件还有什么方式获取到halfChecked的数据呢?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
🧐 问题描述
如图所示,目前可以获取到checked的value,但获取不到父级节点的value(也就是halfChecked),以下是onchange打印的
halfChecked是没数据的,label居然也是null的,下面是我组件配置的示例代码
💻 示例代码
请问TreeSelect这个组件还有什么方式获取到halfChecked的数据呢?
The text was updated successfully, but these errors were encountered: