Search and Top Navigation
#10744 closed feature (wontfix)
Opened January 06, 2015 01:15PM UTC
Closed January 06, 2015 01:20PM UTC
Last modified January 06, 2015 02:14PM UTC
Feature Request - add max-height option to selectmenu API
Reported by: | TheWitness | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.selectmenu | Version: | 1.11.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Currently, the only way to set the max-height of a selectmenu before the select menu scrolls, is to either hack this into the jquery-ui.css file, which although works is awkward and does not provide much flexibility, or to hack the DOM using $('#'+id+'-menu').css('max-height', 'blah') function.
It would be much nicer to have this as an option. I see the width there, but not the height, and you can imagine what that does to a page.
Attachments (0)
Change History (3)
Changed January 06, 2015 01:20PM UTC by comment:1
resolution: | → wontfix |
---|---|
status: | new → closed |
Changed January 06, 2015 01:42PM UTC by comment:2
Wow Scott that was quick! Thanks for getting right on top of both of my issues. My only concern with the option to use my own CSS file is from a api framework perspective, it simply add another step of modifying the css file for developers.
Yes, and the 'hack' as I've referred to it is exactly what the selectmenu options processing would have to do anyway. For me there is the idea that if something like dialog(), for example, provides these styling options, why should not the selecmenu()? If you want to keep it closed, that's fine. I have multiple workarounds, but I thought it was an opportunity, that's all.
Regard,
Changed January 06, 2015 02:14PM UTC by comment:3
Dialog has the option for two reasons: The content area has an auto-height option, so there's related handling for min and max height of the wrappers (which are different sizes than the content, but directly related). The other reason is that this is really controlling the resizable aspect of the dialog (when resizable
is set to true
).
Replying to [ticket:10744 TheWitness]:
Or do it properly by defining the max-height in your own CSS file.
It provides exactly as much flexibility as setting the max-height on any other element.
Presumably this "hack" is exactly what your want the option to do.
Simple CSS styles should not be controlled by JavaScript. Isn't that the "hack" you were referring to?