You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The bug that appeared in this approach in the latest nova updates was that the label field was ignored causing of course the component to look corrupted since the whole label element was absent.
The reason for that is that in the DefaultField.vue file, inside your vendor file (vendor/laravel/nova/resources/js/components/DefaultField.vue)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
In the latest versions of nova custom components created in older versions are missing their labels.
When creating a custom component you build your component using .vue and nova elements, so my component was looking something like:
<DefaultField fieldName="MyFieldName" :fullWidthContent="false" :field="{stacked: false, visible: true}">
The bug that appeared in this approach in the latest nova updates was that the label field was ignored causing of course the component to look corrupted since the whole label element was absent.
The reason for that is that in the
DefaultField.vue
file, inside your vendor file (vendor/laravel/nova/resources/js/components/DefaultField.vue)there is this line:
<div v-if="field.withLabel" :class="labelClasses">
So the solution to this issue is to include it also in the :field parameters like:
<DefaultField fieldName="MyFieldName" :fullWidthContent="false" :field="{stacked: false, visible: true, withLabel: true}">
Beta Was this translation helpful? Give feedback.
All reactions