ember-power-select icon indicating copy to clipboard operation
ember-power-select copied to clipboard

Fix Issue 1057 - component tag rendering twice

Open mpirio opened this issue 6 years ago • 5 comments
trafficstars

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?

mpirio avatar Mar 01 '19 09:03 mpirio

If you only pass class right now, doesn't that give you a single div already?

cibernox avatar Mar 01 '19 13:03 cibernox

@cibernox I tested with last version 2.2.2: no 'div' is added automatically if we define a class.

mpirio avatar Mar 04 '19 14:03 mpirio

@cibernox what do you think about this PR? ;) Thanks

mpirio avatar May 13 '19 08:05 mpirio

Sorry, I forgot about this. Checking

cibernox avatar May 13 '19 10:05 cibernox

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.

cibernox avatar May 13 '19 10:05 cibernox