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

Not possible to set BelongsTo as searchable inside of dependency container #188

Open
lisotton opened this issue Aug 24, 2021 · 1 comment

Comments

@lisotton
Copy link

Hello,

I was trying to use a BelongsTo field, with searchable inside of a NovaDependencyContainer, but when creating a new record, the request to load the items when searching returns a 404.

It happens because the method areDependenciesSatisfied from HasDependencies trait returns returns false. The $request in that case is empty, containing only the parameters for the search, so it is expected that the dependencies won't be satisfied.

In this case, the field is not returned by the method availableFields and the request returns a 404.

Am I doing something wrong or this is expected?

@madsem
Copy link

madsem commented Sep 4, 2021

I have the same/similar issue, when I duplicated the belongsto field outside the nova dependency container closure (and then hide it), it started to work again and I was able to select the relationship from the dropdown.

It was working without this before, I recently upgraded Nova to latest version, something must've changed there.

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

No branches or pull requests

2 participants