Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    comboboxitem selection doesn't stay highlighted

    With the comboboxitem, we're seeing that the selection isn't highlighted when you reopen the drop down for all of our comboxes. So for example, you make your selection and click away. Then you cilck on the combobox again, and though the selection appears at the top, the dropdown below starts at the top of the dropdown instead of where the selection is.

    We're using setvaluemap and messing with the label. Is there some reason why comboboxitem wouldn't highlight the selection?

    Code:
    new ComboBoxItem("groupBy", "Group by"){{
    	setTextMatchStyle(TextMatchStyle.SUBSTRING);
    	setAddUnknownValues(false);
    	LinkedHashMap<String, String> groupByMap = new LinkedHashMap<String, String>();
    	setValueMap(attrMap);
    }}
    where attrMap is done like this:

    Code:
    attrMap = new LinkedHashMap<String, String>();
    for (Record attr : getAttrs()){
    	String name = attr.getAttribute("name");
    	String label = attr.getAttribute("label");
    				
    	String processedLabel = !StringUtil.isEmpty(label) ? label + " (" + name + ")" : name;					
    	attrMap.put(name, processedLabel);
    }

    #2
    I did a little more looking into this and even the simple test comboboxitems I created don't show show the behavior I expected: (1) selecting an item in the combobox and reentering the combobox, the combobox retains selection highlighting, (2) if a selection is at a lower scrolled position in the dropdown, the dropdown scrolls to there. Neither of those behaviors were evident.

    Is there any plans to add those behaviors, or is there a way to get the combobox to do those behaviors?

    Comment

    Working...
    X