-
Notifications
You must be signed in to change notification settings - Fork 95
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
NovaDependencyContainer #26
Comments
@yassipad What could be causing this package not work with: https://github.com/dillingham/nova-ajax-select |
I'm guessing both are using the "attribute" value of each field, which needs to be changed for this package to work; you would have have several times the same attribute otherwise. Example: If a User has Posts, instead of having the default attributes ('name', 'email', 'content', 'title', 'content', 'title'), I need to transform them into nested attributes ('name', 'email', 'posts[0][title]', 'posts[0][content]', 'posts[1][title]','posts[1][content]'). |
Yes, it seems there are a handful of very useful field packages that many people use, that throw monkey wrenches into others. Like yassipad guessed, this is almost certainly due to the way these fields are using the attribute field. You will see fields like epartment/dependency-container, dillingham/nova-ajax-select, and 64robots/json have issues. Ex. I had to modify 64robots/json to specifically look for dependency-container fields and handle one extra level of depth. Seems to be a similar issue here, as well as others. Sure you could go one more level deep with the attribute abstraction, but seems like it would be hard to find the line to draw, at exactly how far deep to go. Maybe as a way to fix some of this, Nova should adopt several more fields into their core. It would still require other fields depending on attribute (like this one) to have to check for field types, but at least they would be standard field types with standard names, and not the random name of a 3rd party one the dev decided on. Or even a trait called usesAttributes that could be checked for with instanceof or something. Just a thought. |
if anyone is interested, this is a 'fix' for https://github.com/orlyapps/nova-belongsto-depend orlyapps/nova-belongsto-depend#39 it works on both a nested form or directly in the resource |
@Fabio1988 Could you please help me in testing? If everything works, I will do a PR. |
Please upvote my PR |
I fixed conflicts in the new PR. Please upvote. epartment/nova-dependency-container#202 |
Unfortunately it's not working with the package NovaDependencyContainer.
I use that dependency-container to show certain attributes, when something is selected in the form. But when I use NestedForms and I select something in the select-box, nothing happens.
Is there a workaround? Would be great to use both in the same Nova model.
The text was updated successfully, but these errors were encountered: