Opened 8 years ago
Closed 8 years ago
#10743 closed bug (wontfix)
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.
Change History (5)
comment:1 Changed 8 years ago by
comment:2 Changed 8 years ago by
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.
TheWitness
comment:3 Changed 8 years ago by
You have a reference to the original option
element inside _renderItem()
. See http://api.jqueryui.com/selectmenu/#method-_renderItem
comment:4 Changed 8 years ago by
Yea, sorry, I was aware of that. I blame it on lack of sufficient coffee in the morning. Sorry for the spam.
comment:5 Changed 8 years ago by
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.