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

Have option to set trigger tag name so that it can be passed a lableable tag (i.e button)

Open BenJohnCarson opened this issue 8 years ago • 5 comments

I've been trying to associate a label using the for attribute with the power select trigger but I'm currently unable because it uses an un-lableable tag (div). Is there anyway currently to force the trigger to render as a button/any plans to make this possible?

Thanks!

BenJohnCarson avatar Feb 09 '18 14:02 BenJohnCarson

There is a private _triggerTagName property that you can pass, but I never mad it public. I never made it public because it's not something you can change in runtime, it only has effect on initial render.

cibernox avatar Feb 09 '18 14:02 cibernox

If you can try it and it works for you I might consider making it public tho.

cibernox avatar Feb 09 '18 14:02 cibernox

Thanks for the speedy reply! It does work for changing the rendered element, but unfortunately changing it to anything other than a div seems to break the functionality so I may have to take a different approach

BenJohnCarson avatar Feb 09 '18 15:02 BenJohnCarson

I'm curious about why it breaks the functionality.

cibernox avatar Feb 09 '18 15:02 cibernox

Changing it to a button makes it refresh the page on click, adding all the form values as query parameters to the url. So tried changing it to select instead, but that seems to hide the placeholder/selected value text.

BenJohnCarson avatar Feb 09 '18 15:02 BenJohnCarson