Closed keizah7 closed 3 years ago
Thanks for this issue, i was having an error due to not supporting Panels! It would be nice to have suport for Panels.
A workaround I am using is to get the fields contained in the Panel
and set them as fields for NovaDependencyContainer
and then set that NovaDependencyContainer
field as child in the original Panel
. On nova form this renders the titles of the Panel but not their encapsulated fields, but when you set the dependent value the panel containing the corresponding NovaDependencyContainer
renders as it should and the data are passed successfully to the back end.
public function fields(Request $request)
{
return [
new Panel('Panel-A', [
NovaDependencyContainer::make([
// original Panel-A fields
])->dependsOn('category.id',$id)
]),
];
}
I've been using the same sort of workaround to be honest, as dealing with panels delves way deep into nova core, as panels are first class objects so to speak there and have a ton of functionality associated with them.
Someone can for sure try and work up a PR if they would like, but the workaround is the way for the foreseeable future.
It would be cool if package in future support Field Panels