nova-button icon indicating copy to clipboard operation
nova-button copied to clipboard

Only last added button is working on latest nova version (v2.4.0)

Open funkdoobiest opened this issue 5 years ago • 13 comments

When I add more than one button, only the last added button will work. Clicking on other buttons have no effect. There is no error in console nor an xhr request will be fired.

funkdoobiest avatar Oct 15 '19 19:10 funkdoobiest

Can you provide some code to examine

dillingham avatar Oct 16 '19 01:10 dillingham

Sure.

           Button::make('Approve', 'inquiry-approve')
                ->style('primary-outline')
                ->confirm('Are you sure?')
                ->visible($this->status == 'pending'),

            Button::make('Decline', 'inquiry-decline')
                ->style('danger-outline')
                ->confirm('Are you sure?')
                ->visible($this->status == 'pending'),

"Approve" button is not working, "Decline" is. If I remove "Decline", "Approve" works. This code worked before update to L6 und latest Nova version.

funkdoobiest avatar Oct 16 '19 11:10 funkdoobiest

More details: if I remove the "confirm", both buttons are working. Seems like if two buttons with confirmation are on same page, only last is opening the modal.

funkdoobiest avatar Oct 17 '19 21:10 funkdoobiest

Confirming that this issue exists on Laravel Nova v2.5.

Only the last button of the last row can be clicked when using confirm().

rsiasat00 avatar Nov 01 '19 12:11 rsiasat00

Confirming that this issue exists on Nova 2.6.1

Button::make('Quick Pay')->confirm('Are you sure?', view('partials.quickpay')->render())

the confirm dialog does not show, except for the last row in the index list.

PaulLawton227 avatar Dec 04 '19 11:12 PaulLawton227

People are welcome to contribute a solution. I'll review

dillingham avatar Dec 05 '19 13:12 dillingham

Tried to find a solution, but my Vue-skills are not good enough ;-)

funkdoobiest avatar Dec 05 '19 15:12 funkdoobiest

I updated to v2.8.0 today. Same thing is still happening.

noxahti avatar Dec 07 '19 00:12 noxahti

I have same issue in 2.8.0

vayurobins avatar Dec 13 '19 22:12 vayurobins

and still the same issue in 2.9.2 - could you please fix this?

nilsE avatar Jan 06 '20 14:01 nilsE

Any updates on this? I tried to find a solution but couldnt. My js skills are not good as well :(

noxahti avatar Mar 07 '20 20:03 noxahti

@dillingham Please review the pull request, thanks :)

marijnhurkens avatar Mar 30 '20 15:03 marijnhurkens

What's the current state of this issue? It seems I have the same problem on an app I'm building.

skoyah avatar May 04 '20 10:05 skoyah