This PR fixes error when using metrics and modals are presents at the same time (not within modal)
I will not open issue, basically steps to reproduce
Install Orchid, go to users list, click on "edit email" modal - everything is OK
Add dummy metric layout
public function query(): iterable
{
return [
// ...
'metrics' => 1,
];
}
public function layout(): iterable
{
// ...
Layout::metrics(['Metrics' => 'metrics']),
}
Click same button again - modal data was not loaded (we can see skeleton and 500 error in a console)
Proposed Changes
Default data for metrics currently is empty array so it is passes is_array() check within layouts/metric.blade.php (currently line 13) and expects value key to be present. This PR should fix it
This PR fixes error when using metrics and modals are presents at the same time (not within modal)
I will not open issue, basically steps to reproduce
Proposed Changes
Default data for metrics currently is empty array so it is passes
is_array()
check withinlayouts/metric.blade.php
(currently line 13) and expectsvalue
key to be present. This PR should fix it