-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
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
fix: ra inputs outside <Form>
need a SourceContext
#9944
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this is the purpose of this PR, could you please add a story and a unit test showing that TextInput works inside a simple <form>
tag?
import { Form } from '../form'; | ||
|
||
export default { | ||
title: 'ra-core/core/SourceContext', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd move it to the TextInput story. It doesn't make sense to tests a ra-ui-mui component inside ra-core.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just use a custom TextInput like in ReferenceInputBase.stories.tsx
Problem
Inputs outside a
<Form>
now need aSourceContext
but sometimes we need to use ra inputs outside a formSolution
Provide a default
SourceContext