Can't extend / set defaults
optikalefx opened this issue · comments
I had the clipping issue when upgrading from 2 -> 3, so I went to set the default for all tooltips to render on the body. But just merely having
import EmberTooltipComponent from 'ember-tooltips/components/ember-tooltip';
export default EmberTooltipComponent.extend({
effect: 'fade',
side: 'bottom',
});
in existence, causes the tooltip to show an empty popup.
Any idea where I can look for this?
@optikalefx anything logged in the console / exceptions thrown?
Here's a twiddle https://ember-twiddle.com/ac75eb9934ee38531a5e31722d25dcde?openFiles=components.ember-tooltip.js%2Ctemplates.components.ember-tooltip.hbs when we attempt to extend with defaults, the tooltip is just empty. If you delete the component files it will work.
I find this to be the case for the 2.x branch as well.
@optikalefx So I think the issue here is that if you provide an hbs
template in addition, it overrides the one provided by ember-tooltips
, due to how the template resolution works. If you omit the template file, it works: https://ember-twiddle.com/151ed7e9b619ce02f240decab8d5e791?openFiles=components.ember-tooltip.js%2C
Added a note to the docs.