我想用React Spring为Antd菜单项设置动画,但是Antd似乎不喜欢:D
这是一个代码示例
<Menu
theme="dark"
mode="inline"
inlineCollapsed={false}
selectedKeys={[location.pathname]}
openKeys={openKeys}
onOpenChange={handleOnOpenChange}
>
{transitions.map(({ props, key }) => (
<animated.div key={key} style={props}>
{currentMenuData.parent && (
<Menu.ItemGroup title={<b>{currentMenuData.title}</b>}>
<Menu.Item onClick={() => hanldeMenuClick(currentMenuData.parent)}>
<Icon type="left-circle" />
<span>Back</span>
</Menu.Item>
</Menu.ItemGroup>
)}
{currentMenuData.children.map(child => options[child.type](child))}
</animated.div>
))}
</Menu>
蚂蚁给我这个错误:
Uncaught TypeError: Cannot read property 'isRootMenu' of undefined