Giter Club home page Giter Club logo

Comments (7)

yassilah avatar yassilah commented on September 23, 2024 2

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]').

from laravel-nova-nested-form.

sabid avatar sabid commented on September 23, 2024 1

@yassipad What could be causing this package not work with:

https://github.com/dillingham/nova-ajax-select

https://github.com/orlyapps/nova-belongsto-depend

from laravel-nova-nested-form.

g0shed avatar g0shed commented on September 23, 2024 1

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

from laravel-nova-nested-form.

nickpoulos avatar nickpoulos commented on September 23, 2024

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.

from laravel-nova-nested-form.

alberto-bottarini avatar alberto-bottarini commented on September 23, 2024

@Fabio1988
I created a fork of nova-dependecy-container.
Here you can find a container version that works inside a nested form.
https://github.com/alberto-bottarini/nova-dependency-container

Could you please help me in testing? If everything works, I will do a PR.

container-nested

from laravel-nova-nested-form.

alberto-bottarini avatar alberto-bottarini commented on September 23, 2024

Please upvote my PR
epartment/nova-dependency-container#146

from laravel-nova-nested-form.

smskin avatar smskin commented on September 23, 2024

I fixed conflicts in the new PR. Please upvote. epartment/nova-dependency-container#202

from laravel-nova-nested-form.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.