Skip to content
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

list: Supplied override code removes create/show/edit buttons #512

Open
jackbentley opened this issue Nov 2, 2023 · 0 comments
Open

list: Supplied override code removes create/show/edit buttons #512

jackbentley opened this issue Nov 2, 2023 · 0 comments

Comments

@jackbentley
Copy link

API Platform version(s) affected: 3.4.4

Description
When using the override code provided, the buttons for create/show/edit disappear.

let code =
'If you want to override at least one field, paste this content in the <ListGuesser> component of your resource:\n\n';
code += `const ${schema.title}List = props => (\n`;
code += ` <ListGuesser {...props}>\n`;
fields.forEach((field) => {
code += ` <FieldGuesser source={"${field.name}"} />\n`;
});
code += ` </ListGuesser>\n`;
code += `);\n`;
code += `\n`;
code += `And don't forget update your <ResourceGuesser> component:\n`;
code += `<ResourceGuesser name={"${schema.name}"} list={${schema.title}List} />`;

Also, having to define all resources in order to override just one seems really silly.

let code =
'If you want to override at least one resource, paste this content in the <AdminGuesser> component of your app:\n\n';
resources.forEach((r) => {
code += `<ResourceGuesser name={"${r.name}"} />\n`;
});

The overriding implementation by #63 no longer works. Is there a better way to do this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant