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

Upgrading to Nova 3.21 breaks ConditionalContainer with HasMany field #55

Closed
kukukk opened this issue Feb 24, 2021 · 5 comments
Closed
Labels
bug Something isn't working

Comments

@kukukk
Copy link

kukukk commented Feb 24, 2021

After upgrading Nova to 3.21 (or 3.22) ConditionalContainer no longer works with HasMany field. It shows the loading icon, but in the background there is a GET request which returns 409 Conflict.

With Nova 3.20.0 it works.

@milewski milewski added the bug Something isn't working label Feb 24, 2021
@milewski
Copy link
Member

Workaround:

    public function fieldsForIndex(NovaRequest $request): array
    {
        return [
            HasMany::make('Your Has Many Resource'),
        ];
    }

@kukukk
Copy link
Author

kukukk commented Feb 24, 2021

It works. Thanks!

@milewski
Copy link
Member

I found a fix:

public function hasRelatableField(NovaRequest $request, $attribute)
{
    return $this->availableFields($request)->whereInstanceOf(\Laravel\Nova\Contracts\RelatableField::class);
}

Would you be able to send a PR for this?

@kukukk
Copy link
Author

kukukk commented Feb 24, 2021

Should it be a PR for Nova? I don't know where the Nova development is done.

Btw, it seems to be a bigger issue because it also break https://novapackages.com/packages/epartment/nova-dependency-container

@milewski
Copy link
Member

Never mind I fixed it pushed on version v1.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants