-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
Description
In PR related to the new Select component we faced a problem where the Select component must have generic props and forward ref at the same time. This led to troubles with TS types:
- type assertions had to be added in
packages/ui/src/components/form-input/index.tsandpackages/ui/src/components/form-primitives/select.tsx, - the props type of
withForm HOCwas changed fromForwardRefExoticComponent<T>toComponentType<T> | ForwardRefExoticComponent<T>inpackages/ui/src/components/form-input/components/form-hoc.tsx
We need to simplify this solution.
Refs:
https://oida.dev/typescript-react-generic-forward-refs/
Reactions are currently unavailable