V8 Livewire 3 Compatibility?
Laravel Form Components Version
v8.1
Laravel Version
v10.22.0
Alpine Version
3.13
Bug description
When setting up on a fresh project, it appears the Morph Markers are not working for the form components, where as they did fine with Livewire 2.
<div class="mb-2">
<x-label>First Name</x-label>
<x-input name="forename" />
</div>
<div class="mb-2">
<!-- __BLOCK__ --><label class="form-label" :id="$id('fc-label')" id="fc-label-1">
<!-- __BLOCK__ --> First Name
<!-- __ENDBLOCK__ -->
</label>
<!-- __ENDBLOCK__ -->
<div class="form-text-container form-input--md ">
<!-- __BLOCK__ --> <!-- __ENDBLOCK__ -->
<input class="form-text" <!--="" __block__="" --=""> name="forename" <!-- __ENDBLOCK__ -->
<!-- __BLOCK__ --> id="forename" <!-- __ENDBLOCK__ -->
<!-- __BLOCK__ --> <!-- __ENDBLOCK__ -->
type="text"
/>
<!-- __BLOCK__ --> <!-- __ENDBLOCK__ -->
</div>
</div>
When downgrading to V7, it renders but still displays the Morph Markers.
Steps to reproduce
- Install Laravel
- Install Livewire 3
- Install Laravel Form Components
- Create component and add form component.
- Build
- View
Relevant log output
No response
Same problem. Compatibility is required with Livewire 3
Updated: In base to https://livewire.laravel.com/docs/morphing#injecting-morph-markers Work if in config/livewire.php change 'inject_morph_markers' to false.
'inject_morph_markers' => false,
Note: You need to run "php artisan view:clear" to see the changes.
This issue is stale because it has been open 21 days with no activity. Remove stale label or comment or this will be closed in 7 days.
Hey! The components CSS failed before I added those lines to tailwind.config.js.
For the record, I upgraded from Livewire 2 to 3
// Make sure you add these lines
"./vendor/rawilk/laravel-form-components/src/**/*.php",
"./vendor/rawilk/laravel-form-components/resources/**/*.php",
"./vendor/rawilk/laravel-form-components/resources/js/*.js",
Before:
After: