fix: memory leak of Trigger (#1483)

pull/1534/head
Reson-a 2019-12-10 14:53:15 +08:00 committed by tangjinzhou
parent 79438a8543
commit d6234307d2
1 changed files with 2 additions and 2 deletions

View File

@ -628,7 +628,7 @@ export default {
};
}
const trigger = cloneElement(child, newChildProps);
this.trigger = cloneElement(child, newChildProps);
return (
<ContainerRender
@ -640,7 +640,7 @@ export default {
getContainer={this.getContainer}
children={({ renderComponent }) => {
this.renderComponent = renderComponent;
return trigger;
return this.trigger;
}}
/>
);