mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-17 10:41:13 +08:00
fix(react): createComponent prop type error
This commit is contained in:
@ -27,9 +27,9 @@ export const createReactComponent = <
|
|||||||
ReactComponentContext?: React.Context<ContextStateType>,
|
ReactComponentContext?: React.Context<ContextStateType>,
|
||||||
manipulatePropsFunction?: (
|
manipulatePropsFunction?: (
|
||||||
originalProps: StencilReactInternalProps<ElementType>,
|
originalProps: StencilReactInternalProps<ElementType>,
|
||||||
propsToPass: any,
|
propsToPass: any
|
||||||
) => ExpandedPropsTypes,
|
) => ExpandedPropsTypes,
|
||||||
defineCustomElement?: () => void,
|
defineCustomElement?: () => void
|
||||||
) => {
|
) => {
|
||||||
if (defineCustomElement !== undefined) {
|
if (defineCustomElement !== undefined) {
|
||||||
defineCustomElement();
|
defineCustomElement();
|
||||||
@ -68,7 +68,7 @@ export const createReactComponent = <
|
|||||||
(acc as any)[name] = (cProps as any)[name];
|
(acc as any)[name] = (cProps as any)[name];
|
||||||
}
|
}
|
||||||
return acc;
|
return acc;
|
||||||
}, {});
|
}, {} as ExpandedPropsTypes);
|
||||||
|
|
||||||
if (manipulatePropsFunction) {
|
if (manipulatePropsFunction) {
|
||||||
propsToPass = manipulatePropsFunction(this.props, propsToPass);
|
propsToPass = manipulatePropsFunction(this.props, propsToPass);
|
||||||
|
Reference in New Issue
Block a user