Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib: Make DynamicListForm.itemcomponent a component type instead of i…
…nstance Existing callers in podman/machines used it like that: <DynamicListForm ... itemcomponent={ <PublishPort />} /> But from a conceptual as well as type-check perspective this is nonsense: This is a totally invalid object as it does not get any (required) properties. It needlessly runs initialization, and can never actually get rendered. Running typechecker on this rightfully complained about > src/ImageRunModal.jsx(1062,51): error TS2740: > Type '{}' is missing the following properties from type '{ id: any; item: any; ... Change this to specify the type, so that it can be instantiated properly with `React.createElement()`. Existing callers in podman/machines have to be changed to <DynamicListForm ... itemcomponent={PublishPort} />
- Loading branch information