laravel-form-components icon indicating copy to clipboard operation
laravel-form-components copied to clipboard

V8 Livewire 3 Compatibility?

Open gRoberts84 opened this issue 2 years ago • 3 comments

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>
image
<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"

            /&gt;

    <!-- __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

gRoberts84 avatar Sep 08 '23 19:09 gRoberts84

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.

joserick avatar Sep 14 '23 04:09 joserick

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.

github-actions[bot] avatar Oct 05 '23 12:10 github-actions[bot]

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: image

After: image

magarrent avatar May 14 '24 07:05 magarrent