Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#15075 closed bug (worksforme)

Custom Selectmenu with _renderItem crashes when calling "refresh"

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

Description (last modified by Ryan J Ollos)

jQuery Version 3.1.1

$.widget('custom.bugselectmenu', $.ui.selectmenu, {
    _renderItem: function ($ul, option) {
        var $li = $('<li>', { text: option.label });
        return $li.appendTo($ul);
    }
});

$option.bugselectmenu('refresh');

When calling refresh, there is a null reference exception.

Change History (3)

comment:2 Changed 2 years ago by Ryan J Ollos

Description: modified (diff)

comment:3 Changed 2 years ago by Scott González

Resolution: worksforme
Status: newclosed

comment:4 Changed 2 years ago by Scott González

jsbin didn't save my updated example for some reason. Here it is: http://jsbin.com/pufevezoja/1/edit?html,js,output

Note: See TracTickets for help on using tickets.