jQuery UI Widgets › Forums › Lists › DropDownList › autoDropDownHeight: it doesn't automatically size your dropdown as expected
This topic contains 1 reply, has 2 voices, and was last updated by Dimitar 9 years, 7 months ago.
-
Author
-
June 26, 2015 at 11:41 pm autoDropDownHeight: it doesn't automatically size your dropdown as expected #73104
I had trouble using the DropDownList with a large number of items. The dropdown was near the bottom of the page, and I wanted the list to appear above the button. I set the enableBrowserBoundsDetection to true, but the dropdown still appeared below its button. I figured out that the problem was the number of items in the list: with a short list, the dropdown displayed above the button correctly. I tried setting the dropDownHeight property, but that was ignored. Finally I saw that the autoDropDownHeight property was set after the dropDownHeight, and removing that fixed the problem.
I had inherited the initial code for the DropDownList from our designer, and did not guess that the problem was the autoDropDownHeight property. I assumed that a property named with ‘auto’ and ‘height’ would automatically adjust the height of the object based on the UI. It seems counterintuitive to me that instead it means that it enlarges the listbox to whatever the number of items in the list. Anyway I think this should be documented better so people like me (OK, call me misguided) don’t spend several hours tracking down the cause of this unexpected behavior. Especially put a note in the dropDownHeight and enableBrowserBoundsDetection about the effects of autoDropDownHeight on listbox size and placement.
June 29, 2015 at 11:03 am autoDropDownHeight: it doesn't automatically size your dropdown as expected #73140Hello bb1769,
Here is the description of the property autoDropDownHeight from the jqxDropDownList API Documentation:
Sets or gets whether the height of the jqxDropDownList’s ListBox displayed in the widget’s DropDown is calculated as a sum of the items heights.
It exactly matches the behaviour provided by setting the property. I do not think it can be assumed that this property “would automatically adjust the height of the object based on the UI” by reading this description.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.