-
-
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
ra-no-code - Introduce Resource Configuration #6217
Conversation
djhi
commented
Apr 27, 2021
•
edited
Loading
edited
- Introduce Configuration Screen
- Implement basic resource configuration
- Implement basic field configuration
- Allow to select on which views a field is displayed
cc880f9
to
41beace
Compare
a76d5aa
to
429825a
Compare
429825a
to
a8b160f
Compare
return ( | ||
<CardContent> | ||
<TextInput | ||
source={`fields[${index}].props.source`} |
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 $index
can contain a dot, you should use lodash's get
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 don't get this comment
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.
It does not because fields
is the array of fields in the resource configuration object
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'll make it clearer though
packages/ra-no-code/src/ResourceConfiguration/FieldConfigurationFormSection.tsx
Outdated
Show resolved
Hide resolved
packages/ra-no-code/src/ResourceConfiguration/FieldConfigurationFormSection.tsx
Outdated
Show resolved
Hide resolved
packages/ra-no-code/src/ResourceConfiguration/ResourceConfiguration.tsx
Outdated
Show resolved
Hide resolved
.create(resource, { | ||
data: record, | ||
}) | ||
.catch(error => console.error(error)); |
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.
why did you remove error catching?
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.
Because I only used it for debug. A proper error catching should be added
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.
For now I'd rather have the whole thing explode than the error being hidden like before