mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-02-28 21:20:28 +00:00
fix: miniapp compwrapper ref
This commit is contained in:
parent
473a06dba9
commit
5ae08f5235
@ -1,4 +1,4 @@
|
||||
import { createElement, Component } from 'rax';
|
||||
import { createElement, Component, forwardRef } from 'rax';
|
||||
|
||||
export default function (Comp) {
|
||||
class compWrapper extends Component {
|
||||
@ -7,11 +7,15 @@ export default function (Comp) {
|
||||
}
|
||||
|
||||
render() {
|
||||
const { forwardRef } = this.props;
|
||||
return createElement(Comp, {
|
||||
...this.props,
|
||||
ref: forwardRef,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return compWrapper;
|
||||
return forwardRef((props, ref) => {
|
||||
return createElement(compWrapper, { ...props, forwardRef: ref });
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user