ember-power-select
ember-power-select copied to clipboard
Opt out of default `disabled` options behaviour
Hi! I've got a case where my options collection consists of objects that have disabled
property but I don't want power-select to render them as disabled.
I have tried to extend options
component, copied template and just remove the line with aria-disabled={{ember-power-select-true-string-if-present opt.disabled)}}
to not even render aria-disabled flag. I can select option now, but it's not highlightable, i.e. when i move mouse over it will not get a blue background, keyboard also ignores it. Traced it down to the highlight
action in power-select.js, where it will ignore highlighting due to
if (option && get(option, 'disabled')) {
return;
}
Is there anything I can do in order to make power select ignore disabled
property? If not do you think it's valid idea to allow this in future versions of power select? I can make a PR for this. Thanks!