如何使Antd菜单和React Spring一起工作?

时间:2019-03-22 17:48:43

标签: javascript reactjs antd react-spring

我想用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 

0 个答案:

没有答案