ReactJS — Overlay Button not Clickable when placed above a List

会有一股神秘感。 提交于 2019-12-25 09:00:08

问题


Please see the Code Example in Code Sandbox I have created

I want the button action of the Floating Button to fire. But instead the Action assigned to the ListItem is triggered. Any Ideas solution will be highly appreciated.

Thanks!


回答1:


It's more a markup/styling issue than a js problem. The easiest thing you can do is set a z-index on the overflow container.

const overlay = {
    position: 'absolute',
    bottom: 30,
    right: 10,
    zIndex: 100
}

This makes your example working, but maybe there are better markup solutions to solve your problem.



来源:https://stackoverflow.com/questions/44297074/reactjs-overlay-button-not-clickable-when-placed-above-a-list

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!