Skip to content

Commit 8f9192e

Browse files
Merge pull request #56 from kirschbaum-development/bugfix/plural-fields-changing-to-singular
Changes singularLabel to stop forcibly converting plural labels
2 parents b494695 + bc71f35 commit 8f9192e

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/NovaInlineRelationship.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,9 +315,7 @@ protected function setMetaFromClass(array $item, $attrib, $value = null, $resour
315315
}
316316

317317
$item['meta'] = $class->jsonSerialize();
318-
// We are using Singular Label instead of name to display labels as compound name will be used in Vue
319-
$item['meta']['singularLabel'] = Str::title(Str::singular(str_replace('_', ' ', $item['label'] ?? $attrib)));
320-
318+
$item['meta']['singularLabel'] = $item['label'] ?? $attrib;
321319
$item['meta']['placeholder'] = 'Add ' . $item['meta']['singularLabel'];
322320

323321
return $item;

0 commit comments

Comments
 (0)