Skip to main content

Search and Top Navigation

#10189 closed bug (duplicate)

Opened July 13, 2014 09:42PM UTC

Closed July 14, 2014 12:44PM UTC

selectmenu refresh sets incorrect buttonText when custom rendering

Reported by: achang Owned by:
Priority: minor Milestone: none
Component: ui.selectmenu Version: 1.11.0
Keywords: Cc:
Blocked by: Blocking:

See the refresh function below. I've overridden it with what I believe it should do:

$.widget('custom.myselectmenu', $.ui.selectmenu, {
_renderItem : function(ul, item) {
	var itemElem = this._super(ul, item);
	return itemElem;
// Overriding to make label consistent.
refresh : function() {
	// The following line incorrectly sets the buttonText to the custom rendered content
	// this._setText( this.buttonText, this._getSelectedItem().text() );
	this._setText(this.buttonText, this.items[this.element[0].selectedIndex].label);
	this._setOption('width', this.options.width);
Attachments (0)
Change History (1)

Changed July 14, 2014 12:44PM UTC by tj.vantoll comment:1

component: ui.selectableui.selectmenu
resolution: → duplicate
status: newclosed

Duplicate of #10142.Hi achang,

Thanks for taking the time to contribute to jQuery UI. This should be covered by #10142. as we're planning on adding an extension point to handle this.