jkusa / ember-cli-clipboard

A simple ember wrapper around clipboard.js
https://jkusa.github.io/ember-cli-clipboard
MIT License
73 stars 33 forks source link

Deprecation warning: `this.sendAction` #369

Closed fernandaparisi closed 1 year ago

fernandaparisi commented 2 years ago

Describe the bug success and error actions are not working properly due to deprecation of sendAction method: https://deprecations.emberjs.com/v3.x/#toc_ember-component-send-action

To Reproduce Steps to reproduce the behavior:

  1. Copy a text using the button
  2. No success nor error action gets triggered
  3. Debugging addon/components/copy-button.js, line 91, you'll get a warning saying that Closure actions are deprecated.

Expected behavior success and error actions should work accordingly.

Screenshots

Desktop (please complete the following information):

jkusa commented 2 years ago

Hi @fernandaparisi 👋, can you share how you are passing an action to <CopyButton>? Also, what version of Ember are you using? sendAction is pretty antiquated at this point and was deprecated in Ember 3.x but should still work. It was removed in Ember 4.x.

I've be meaning to do a major release update here that will remove sendAction among other updates.

jkusa commented 1 year ago

Update, v1.0.0 removed support for sendAction.

Closing this issue for now. Please reopen if further discussion is needed.