Opened 10 years ago

Closed 9 years ago

Last modified 8 years ago

#9145 closed enhancement (wontfix)

ComboBox: support iconAttr

Reported by: burnsmicro Owned by:
Priority: high Milestone: future
Component: Dijit - Form Version: 1.3.0
Keywords: multiple attributes in drop-list, FilteringSelect, ComboBox Cc:
Blocked By: Blocking:

Description

When the searchAttr is not at all descriptive it would be very desirable to show a description or image beside each searchAttr value in the drop-list.

For example, when we use a FilteringSelect? to select the 'proId' value from the following data set:

var prodData={
	identifier:"prodId",
	label:"description",
	items:[
		{prodId:"000101", description:"oranges"},
		{prodId:"000102", description:"apples"},
		{prodId:"000103", description:"bananas"}
	]
};

..it would be helpful to display a drop list that looks like:

http://sbctools.com/FSdropList.png

Sorry, cannot figure out how to upload images, but, using text, the drop-list would look like:

000101  apples
000102  oranges
000103  bananas

instead of

000101
000102
000103

This brings up the issue of how to qualify the labelAttr? A couple of thoughts:

1.  labelAttr: "prodId  " + "description",

or

2.  labelAttr: "description",
    labelQual: "R"    // place labels Right of searchAttr values
                      // no labelQual = no searchAttr value displayed

Thanks,

Bob Furber

Change History (3)

comment:1 Changed 10 years ago by bill

Milestone: tbdfuture
Summary: FilteringSelect: multiple attributes in drop-listComboBox: support iconAttr

You can upload images using the "Attach file" button, after the ticket has been created.

The functionality you are asking for can already be achieved by specifying a custom labelFunc method, as documented in the manual.

The only thing I can think of that dijit might support above and beyond that is an iconAttr, similar to DropDownButton etc.

comment:2 Changed 9 years ago by bill

Resolution: wontfix
Status: newclosed

comment:3 Changed 8 years ago by bill

Component: DijitDijit - Form
Note: See TracTickets for help on using tickets.