Skip to content

Commit

Permalink
fix: iframe中冒泡会导致触发rootclose
Browse files Browse the repository at this point in the history
  • Loading branch information
hezhihang authored and yangwei9012 committed Dec 23, 2024
1 parent d30807c commit 48e819c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/amis/src/renderers/Form/NestedSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,13 +196,11 @@ export default class NestedSelectControl extends React.Component<
@autobind
handleOutClick(e: React.MouseEvent<any>) {
e.stopPropagation();

const {options} = this.props;
this.outTargetWidth = this.outTarget.current?.clientWidth;
e.defaultPrevented ||
this.setState({
isOpened: true
});
this.setState(prevState => ({
isOpened: !prevState.isOpened
}));
}

@autobind
Expand Down

0 comments on commit 48e819c

Please sign in to comment.