webbingbrasil / filament-copyactions

A easy-to-use copy actions for Filament Admin Pages, Tables and Form Fields.
56 stars 15 forks source link

Table action not working with tooltip #14

Closed chosten closed 1 year ago

chosten commented 1 year ago

The table action is not working if you set a tooltip on the action. When you set a tooltip the x-data of the button ends up empty, and when you try to copy, the console show the error copyable is not defined.

Is there a workaround ? I don't care about the "Copied!" tooltip if there is a conflict with that.

dmandrade commented 1 year ago

I'll check, I needed to set an xdata in action for it to work in safari. Probably when you set a tooltip it should overwrite.

ChrisHardie commented 1 year ago

In trying out the recent Safari fix, I'm also seeing the error:

[Warning] Alpine Expression Error: Can't find variable: copyable (app.js, line 1)
Expression: "window.navigator.clipboard.writeText(copyable); $tooltip(successMessage);"
zhanang19 commented 1 year ago

I can confirm that it was working smoothly on my side using Firefox & Safari. Could you share your code @chosten @ChrisHardie?

dmandrade commented 1 year ago

Tooltip conflict fixed on v1.1.1