-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
RACdocumentationImprovements or additions to documentationImprovements or additions to documentation
Description
children type of MyComboBoxProps should be children: React.ReactNode | ((item: T) => React.ReactElement);.
Will need to do a sweep in other places, this may not be the only instance where this type needs to be corrected
Discussed in #4456
Originally posted by mgo-af April 29, 2023
Hello!
Just running through the react-aria-components examples, I run into this TS error when copy-pasting the example into a sandbox.
Type 'ReactNode | ((item: T) => ReactNode)' is not assignable to type 'ReactNode | ((item: T) => ReactElement<any, string | JSXElementConstructor<any>>)'.
Type '(item: T) => ReactNode' is not assignable to type 'ReactNode | ((item: T) => ReactElement<any, string | JSXElementConstructor<any>>)'.
Type '(item: T) => ReactNode' is not assignable to type '(item: T) => ReactElement<any, string | JSXElementConstructor<any>>'.
Type 'ReactNode' is not assignable to type 'ReactElement<any, string | JSXElementConstructor<any>>'.
Type 'string' is not assignable to type 'ReactElement<any, string | JSXElementConstructor<any>>'.ts(2322)
types.d.ts(50, 5): The expected type comes from property 'children' which is declared here on type 'IntrinsicAttributes & ListBoxProps<T> & RefAttributes<HTMLDivElement>'
Metadata
Metadata
Assignees
Labels
RACdocumentationImprovements or additions to documentationImprovements or additions to documentation
Type
Projects
Status
✅ Done