reactjs - SwipeableDrawer 与 swipeableArea MaterialUi 上的按钮
问题描述
我正在尝试创建一个这样的 swipeableDrawer。我想要我的 swipeableDrawer 上的一个按钮,我可以点击它来调度一个动作。
但我无法同时点击按钮并滑动可滑动抽屉。我要它。
<Global styles={{
'#swipeable .MuiPaper-root': {
height: `calc(78% - ${drawerBleeding}px)`,
overflow: 'visible',
},
}}/>
<SwipeableDrawer
id={'swipeable'}
anchor="bottom"
open={open}
onClose={toggleDrawer(false)}
onOpen={toggleDrawer(true)}
swipeAreaWidth={100}
disableSwipeToOpen={false}
ModalProps={{
keepMounted: true,
}}>
<>
<Card>
<CardContent>
<div className="row">
<div className="col-12">
{!ricalcolaPremioBTNEnabled ?
<Button className={buttonClasses.root}
onClick={() => history.push(INFO_PERSONALI_PATH)}>CONTINUA</Button> :
<Button className={buttonClasses.root}
disabled={!ricalcolaPremioBTNEnabled}
onClick={handleRicalcolaPremio}>RICALCOLA</Button>}
</div>
</div>
</CardContent>
</Card>
</>
<div style={{height: '100%', marginTop: '3vw', overflowY: 'auto', overflowX: 'hidden'}}>
<div className="row p-3">
Content of swipeable drawer
</div>
</div>
</SwipeableDrawer>
</Global>
我该如何解决?
解决方案
推荐阅读
- android - Dialogflow 发送用户数据
- reactjs - React TypeScript:功能组件中 UseRef 的替代方案
- python - Python CSV Reader 无法正确打印行
- powershell - 使用 Powershell 添加 Active Directory 组
- sql - 将标头添加到 SQL (Sybase) 输出
- maven - 在 Jenkins 中运行并行阶段测试时出现“找不到目录”错误
- python - Airflow 不仅为 DAG 间隔系列的最新实例运行 DAG 运行,而且在我设置 catchup=False 时运行它之前的实例
- java - 如何处理 Spring data jpa & jpql Query 中非必需参数的 PSQLException upper(bytea) 问题
- mysql - 如何在 RDS 上正确使用 Knex / Bookshelf 和 MySQL
- iframe - SecurityError:访问跨域对象上的属性“文档”的权限被拒绝