-
-
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
CheckboxGroupInput inside a ReferenceArrayInput #7570
Comments
Hi @RWOverdijk , Indeed the warning you get makes me think this usage was considered at some point, even though it is currently not officially supported. It might be doable with maybe a few adaptations in the code, and I agree it would be nice to have 🙂 . Regarding your last question, when we test features during development, we use the examples projects (simple, demo, crm...) which allows us to see the changes instantly. |
@slax57 Fair, I'll give that a go. I tried linking so I can test in my own app but I got a lot of issues. Labeling it an enhancement is fair. |
Update for future readers: The issue about controlled/uncontrolled was a pebkac (checkbox controlled uses the checked prop, not the value prop). The rest is still relevant. |
I managed to use both components together on a (very very) simpler use case (btw you made a pretty cool UX) - See the sandbox here in Posts / Edit / Summary The PR below corrects the error whom you perfectly spotted the cause. I'll close the issue, please comment below if I missed something. |
My code:
I get:
I'm not expecting this to work since it's not documented. This is more of a curtocy report (which is why I am not following the template).
So this report is twofold:
action: "roles/d45ccd25-4118-4fe3-adc4-67cf1fd32a2f"
).Context
This context just explains why I was even looking into using CheckboxGroupInput in ReferenceArrayInput.
The use case is me struggling to create a custom input where I want to group together checkboxes. It's for permission inputs. I need accordions for resources and checkboxes for actions. For those more visual, here's a screenshot (sorry it's in Dutch):
I got it working. Reading works fine. Writing works fine.
it's toggling values that is troublesome. I keep getting this warning:So the reason I was looking into is because I was hoping I could find the answer to my issue by looking at the code for it.
Update
Are there any instructions available on how I can use react-admin from source instead of the transpiled version? That would make it a lot easier for me to find, implement and PR a fix for the issues I keep reporting.
The text was updated successfully, but these errors were encountered: