Skip to content

Commit

Permalink
fix: 组件销毁时清除事件绑定
Browse files Browse the repository at this point in the history
  • Loading branch information
laoluo committed Nov 20, 2021
1 parent 6b0af09 commit cdaa3ba
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ const SwitchAttributeList: React.FC<IProps> = (props) => {
listRef.current.children[index]?.scrollIntoView({ block: 'center' });
});
}
return () => {
toolInstance.unbindAll('changeAttributeSidebar');
};
}, [toolInstance, listRef]);

if (!props.stepInfo) {
Expand Down

0 comments on commit cdaa3ba

Please sign in to comment.