Skip to content

Commit 1345c5f

Browse files
committed
Add weight to sortUsing field if it exist
1 parent f0c7bb7 commit 1345c5f

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/NovaInlineRelationship.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,15 @@ protected function getResourceResponse(NovaRequest $request, $response, Collecti
532532

533533
return $value;
534534
})->all();
535+
536+
if (! empty($this->sortUsing)) {
537+
$fields[$this->sortUsing] = $weight;
538+
}
539+
540+
return [
541+
'fields' => $fields,
542+
'modelId' => $modelId,
543+
];
535544
})->all();
536545
}
537546

0 commit comments

Comments
 (0)