react
react copied to clipboard
Extending a SubmissionGrid component I get error [Uncaught TypeError: Cannot call a class as a function]
Using the latest version of @react/formio v5.2.3 I get
Uncaught TypeError: Cannot call a class as a function when I am trying to extend the parent component ie
export default class CustomSubmissionGrid extends SubmissionGrid {}
The error occurred from @babel/runtime/helpers/esm/classCallCheck.js:3:1 at the following code
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
Any recommendation to solve this?
In @formio/[email protected], SubmissionGrid is a functional component and cannot be extended.
Yes thank you, I discovered this change. So the main question here is how to change (extend) the behavior of the component? Is there a viable solution to override somehow?