We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AutoItems props are defined as
export type AutoItemsProps = { render?( item: React.ReactNode, props: AutoViewProps, index: number ): React.ReactNode; } & AutoViewProps;
which forces to provide render as a prop in JSX, as
render
<AutoItems {...props} render={ (node) => <li>node</li> }> </AutoItems>
I suggest to change the interface a bit, renaming render to children, so that
children
export interface AutoItemsProps extends AutoViewProps { render?( item: React.ReactNode, props: AutoViewProps, index: number ): React.ReactNode; }
which allows
<AutoItems {...props}> {(node) => <li>node</li>} </AutoItems>
and still allows using
<AutoItems {...props}/>
Basically, using a property named children allows to place the function as a child in the JSX
No response
The text was updated successfully, but these errors were encountered:
Same issue for AutoFields
AutoFields
Sorry, something went wrong.
No branches or pull requests
Is there an existing issue for this?
The problem
AutoItems props are defined as
which forces to provide
render
as a prop in JSX, asDescribe the solution you'd like
I suggest to change the interface a bit, renaming
render
tochildren
, so thatwhich allows
and still allows using
Basically, using a property named children allows to place the function as a child in the JSX
Describe alternatives you've considered
No response
The text was updated successfully, but these errors were encountered: