Closed spam-n-eggs closed 3 years ago
After looking at this further it looks like it may be limited to nova-dependency-container. I am currently working on a Pull Request to address this issue.
Hey, glad to hear. If you don't get to it before the end of the week, I have some time slated to look at this. Thanks!
This issue is specific to the nova-depedency-container, and I think the proposed fix is slightly problematic in that it is specific to that one package.
My issue with it is that meta.fields
is proprietary only to the department/nova-dependency-container. Fortunately, it looks like the author has thought about (potentially) issues like this and there is an easy solutions.
In your Resource do the following:
// import:
use Illuminate\Support\Facades\Route;
// inside Resource body at top:
use HasDependencies {
doesRouteRequireChildFields as hasDependenciesDoesRouteRequireChildFields;
}
protected function doesRouteRequireChildFields(): bool
{
return $this->hasDependenciesDoesRouteRequireChildFields()
|| Route::currentRouteAction() == 'ZiffMedia\NovaSelectPlus\Controller@options';
}
This will ensure that child fields are included in the ->availableFields() call that the Controller is doing to find the field.
Hope this finds you well, thanks for the report (and subsequent PR as it helped me understand the ultimate issue, even though it was not merged.)
Steps to Reproduce:
Further investigation:
I looked into this, and it looks like the issue is in the controller.
The code below assumes that the SelectPlus Component is at the top level and not on any panels:
The correct call may be
updateFields($request)
but it requires more investigation to be sure.