Closed dant00ine closed 8 years ago
Hmm. I think the best way to do this would be to manually bubble up the action as you said. It will call the action with the same name as the one you provided.
Tim, thanks for the epic response-time. In the above code the action name is uploadImage then or onfileadd? Having a hard time getting that to trigger with sendAction in the component I am using.
I think the following will work:
my-component/template.hbs
{{#pl-uploader onfileadd="bubbleUp"}}
{{/pl-uploader}}
my-component/component.js
import Ember from 'ember';
export default Ember.Component.extend({
actions: {
bubbleUp(file) {
this.sendAction('uploadImage', file);
}
}
});
Anyone know how to send the file upload action to the route level from child component? Am trying all sorts of different combinations of names, parameters...
Am guessing it has to do with onfileadd? But what's the name of this action in the component?
onfileadd="uploadImage" as |queue dropzone|
this.sendAction('uploadImage', file);