Skip to content

Button's loading icon not showing if wire:click has space after the method name #1639

Open
@jtesta66

Description

@jtesta66

Flux version

v2.1.6

Livewire version

v3.6.3

Tailwind version

v4.0.8

Browser and Operating System

Chrome on Windows

What is the problem?

When using wire:click="function (argument...)" and expecting a loading icon on the button, the space before the function arguments prevents the loading icon from rendering

This works:
<flux:button wire:click="dosomething(argument)">Do Something</flux:button>
This doesn't work:
<flux:button wire:click="dosomething (argument)">Do Something</flux:button>

Code snippets

It should be very easy to reproduce with examples I provided. The actual method running in the component doesn't matter.

Component:

function doSomething ($whatever) {
   sleep (5);
}

blade template:
<flux:button wire:click="doSomething ('testing')">Do Something</flux:button>

How do you expect it to work?

I would expect to be able to have a space before the method parameters and still get the loading indicator on the button.

Please confirm (incomplete submissions will not be addressed)

  • I have provided easy and step-by-step instructions to reproduce the bug.
  • I have provided code samples as text and NOT images.
  • I understand my bug report will be closed if I haven't met the criteria above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions