Jetstream modal component turns screen blank when opening


I reused a Jetstream modal component which was the delete user modal. I created a simple button to open it like to:

<div class="p-2">
            <button wire:click="createModalForm"  class="bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 rounded">
                Add Property

This goes to the createModalForm function, the createModalForm is set to false and changes here:

public function createModalForm(){
    $this->openModalForm = true;

This is my modal:

<x-jet-dialog-modal wire:model="openModalForm">
        <x-slot name="title">
            {{ __('Delete Account') }}

        <x-slot name="content">

        <x-slot name="footer">
            <x-jet-secondary-button wire:click="$toggle('openModalForm')" wire:loading.attr="disabled">
                {{ __('Cancel') }}

            <x-jet-danger-button class="ml-2" wire:click="deleteUser" wire:loading.attr="disabled">
                {{ __('Delete Account') }}

Ive used dd to check if the wire:click is working and the dd works fine.

Is there something im missing

Source: Laravel

Categorised as jetstream, laravel, laravel-livewire Tagged , ,


Leave a Reply

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us