ember-power-select
ember-power-select copied to clipboard
Fix Issue 1057 - component tag rendering twice
cf https://github.com/cibernox/ember-power-select/issues/1057
When we set a tagName on a power-select-multiple, this tag is rendering twice because tagName is set for power-select-multiple but it is transmit to power-select also. I removed class too.
improvment idea: Perhaps could we set a default "div" tagName when a class is setted?
If you only pass class right now, doesn't that give you a single div already?
@cibernox I tested with last version 2.2.2: no 'div' is added automatically if we define a class.
@cibernox what do you think about this PR? ;) Thanks
Sorry, I forgot about this. Checking
I have an alternative solution that I think it's more aligned with the future in which components are tagless by default, and it's not a breaking change today.
The problem is that since tagName has a meaning for components, is applied to both elements, which only the internal one should have it. The multiple should only be a wrapper.
I suggest that the way to customize the tag of a multiple-select will be now htmlTag. Internally you pass tagName=(or tagName htmlTag) to EPS. That makes it backwards compatible. And you don't need to touch class.