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

Provide more context to fields #2363

Open
pablobm opened this issue Apr 20, 2023 · 0 comments
Open

Provide more context to fields #2363

pablobm opened this issue Apr 20, 2023 · 0 comments

Comments

@pablobm
Copy link
Collaborator

pablobm commented Apr 20, 2023

A common issue for users of Administrate is that fields do not receive enough context. The most typical use case is that they cannot modify the configuration of a field depending on the current user: hiding/showing the field, showing different select options, etc.

These are some relevant issues, marked fields-context . Some of these refer directly to the lack of context, others are a bit more indirect but still related:

My initial intuition would be to pass the current controller down to fields, so that it can be used as provider of context. This can be passed in turn to the call-able that some options take, as well to new options such as hide_if or something like that.

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

No branches or pull requests

1 participant