Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V8 Livewire 3 Compatibility? #136

Open
gRoberts84 opened this issue Sep 8, 2023 · 3 comments
Open

V8 Livewire 3 Compatibility? #136

gRoberts84 opened this issue Sep 8, 2023 · 3 comments
Labels
bug Something isn't working stale

Comments

@gRoberts84
Copy link

gRoberts84 commented Sep 8, 2023

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 gRoberts84 added the bug Something isn't working label Sep 8, 2023
@joserick
Copy link

joserick commented Sep 14, 2023

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.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 5, 2023

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 github-actions bot added the stale label Oct 5, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 13, 2023
@rawilk rawilk reopened this Dec 13, 2023
@magarrent
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

4 participants