I have a form created by Form.create(), but I can't compiler success.
error like:
Argument of type 'FunctionComponent<MyProps>' is not assignable to parameter of type 'ComponentType<{}>'.
Type 'FunctionComponent<MyProps>' is not assignable to type 'FunctionComponent<{}>'.
Type '{}' is missing the following properties from type 'MyProps': form, and 2 more
My code is:
import { FormComponentProps } from "antd/lib/form";
interface MyProps extends FormComponentProps {
form: any;
}
const TableQuery: FunctionComponent<MyProps> = (props: MyProps) => {
// some code
};
const WrappedTableQuery = Form.create<MyProps>()(TableQuery)
export default WrappedTableQuery;
How can I fix this error.