Skip to content

Commit 29ec359

Browse files
committed
fix incompatibility issue with json-wrapper
1 parent b24d65b commit 29ec359

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/HasConditionalContainer.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace DigitalCreative\ConditionalContainer;
44

5+
use DigitalCreative\JsonWrapper\JsonWrapper;
56
use Illuminate\Http\Resources\MergeValue;
67
use Illuminate\Support\Collection;
78
use Laravel\Nova\Contracts\RelatableField;
@@ -261,6 +262,12 @@ private function flattenDependencies(NovaRequest $request, array $fields)
261262

262263
}
263264

265+
if ($field instanceof JsonWrapper) {
266+
267+
return $this->flattenDependencies($fakeRequest, $field->fields);
268+
269+
}
270+
264271
return [ $field ];
265272

266273
});
@@ -322,6 +329,12 @@ private function findAllContainers($fields): Collection
322329

323330
}
324331

332+
if ($field instanceof JsonWrapper) {
333+
334+
return $this->findAllContainers($field->fields);
335+
336+
}
337+
325338
})
326339
->filter()
327340
/**

0 commit comments

Comments
 (0)