mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 02:58:05 +08:00
fix: 修复折叠器中有 select 或输入框时点击也折叠问题 (#2781)
This commit is contained in:
parent
ad3ab14d09
commit
adef8e0595
@ -7,6 +7,7 @@ import {
|
||||
SchemaCollection,
|
||||
SchemaTpl
|
||||
} from '../Schema';
|
||||
import {isClickOnInput} from '../utils/helper';
|
||||
|
||||
/**
|
||||
* Collapse 折叠渲染器,格式说明。
|
||||
@ -134,7 +135,10 @@ export default class Collapse extends React.Component<
|
||||
}
|
||||
}
|
||||
|
||||
toggleCollapsed() {
|
||||
toggleCollapsed(e: React.MouseEvent<HTMLElement>) {
|
||||
if (isClickOnInput(e)) {
|
||||
return;
|
||||
}
|
||||
this.props.collapsable !== false &&
|
||||
this.setState({
|
||||
collapsed: !this.state.collapsed
|
||||
|
Loading…
Reference in New Issue
Block a user