Search and Top Navigation
#10743 closed bug (wontfix)
Opened January 06, 2015 01:09PM UTC
Closed January 14, 2015 05:30PM UTC
Selectmenu select option visibility not propagated during refresh() execution
Reported by: | TheWitness | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.selectmenu | Version: | 1.11.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Morning jQueryUI Dev team. Here is the issue. I have an application that virtually removes elements from a select by using the display:none CSS on the options. Works just fine with native support.
However, when attempting to use this same method with the selectmenu UI enhancement, those display attributes are not propagated to the resulting li elements upon a refresh() method.
Simple thing, just not sure it's a simple fix.
Attachments (0)
Change History (5)
Changed January 06, 2015 01:12PM UTC by comment:1
Changed January 06, 2015 01:46PM UTC by comment:2
Thanks Scott! I also had to use the _renderItem widget factory to carry the background color, but it was a bit of a hack in that the item.label happened to carry the HexCode. So, it was fairly trivial.
For me it might be a training issue, but to have the parent objects atrributes available in the _renderItem, or at least it's id, would be beneficial.
Changed January 06, 2015 02:18PM UTC by comment:3
You have a reference to the original option
element inside _renderItem()
. See http://api.jqueryui.com/selectmenu/#method-_renderItem
Changed January 06, 2015 07:05PM UTC by comment:4
Yea, sorry, I was aware of that. I blame it on lack of sufficient coffee in the morning. Sorry for the spam.
Changed January 14, 2015 05:30PM UTC by comment:5
resolution: | → wontfix |
---|---|
status: | new → closed |
@TheWitness the problem is that you can't actually hide select options in all browsers. Because this cannot consistently be done between browsers natively, we also will not support this here. This same issue came up on jQuery Mobile https://github.com/jquery/jquery-mobile/issues/6682 with safari and filter widget on native menu. If you need functionality of this sort, you should use disabled, which is the cross browser way to handle this.
I'm going to close this as won't fix
Styling is not copied to elements, but I suppose we can check visibility explicitly. I'll consult with the team on this.