Matt
Matt
```jsx
I think I can do it.
I came up with a fix, but it breaks `propTypes`. Since the TreeView uses `forwardRef`, I have to use a type assertion, write a custom `forwardRef` function, or pass a...
The main problem is that when I use a type assertion to capture the generic type I get `Property 'propTypes' does not exist on type '(props: ITreeViewProps & { ref?:...
If I cast `forwardRef` and do `TreeViewInner.propTypes` instead of `TreeView.propTypes` then I still get type inference without the error, but I'm not sure if the `propTypes` are still captured since...
I created a PR. I'm not sure how `propTypes` will be affected, but it implements the desired behavior. Once React allows components to accept `ref` directly, `forwardRef` can be ditched...
@mellis481
```ts function genericForwardRef( render: (props: P, ref: React.Ref) => JSX.Element ): (props: P & React.RefAttributes) => JSX.Element { // eslint-disable-next-line @typescript-eslint/no-explicit-any return React.forwardRef(render) as any; } ``` I'm not sure...
One downside is that the correct type for `metadata` cannot be inferred in flatten tree. So the only reliable way is to set the generic on `flattenTree`. It will be...
@dgreene1 @mellis481 I updated the PR to use a type assertion. You can see that if you add the `metadata` property to any of the example tests that the type...