dillingham / nova-button

Add buttons on Nova index, detail and lens views.
MIT License
265 stars 33 forks source link

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

Open funkdoobiest opened 5 years ago

funkdoobiest commented 5 years ago

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.

dillingham commented 5 years ago

Can you provide some code to examine

funkdoobiest commented 5 years ago

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 commented 5 years ago

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.

rsiasat00 commented 5 years ago

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

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

PaulLawton227 commented 4 years ago

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.

dillingham commented 4 years ago

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

funkdoobiest commented 4 years ago

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

noxahti commented 4 years ago

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

vayurobins commented 4 years ago

I have same issue in 2.8.0

nilsE commented 4 years ago

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

noxahti commented 4 years ago

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

marijnhurkens commented 4 years ago

@dillingham Please review the pull request, thanks :)

skoyah commented 4 years ago

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