Skip to main content

Search and Top Navigation

#15075 closed bug (worksforme)

Opened October 07, 2016 02:49PM UTC

Closed October 12, 2016 04:30PM UTC

Last modified October 12, 2016 04:35PM UTC

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

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.

Attachments (0)
Change History (3)

Changed October 09, 2016 02:28PM UTC by rjollos comment:1

description: jQuery Version 3.1.1 \ \ $.widget('custom.bugselectmenu', $.ui.selectmenu, { \ _renderItem: function ($ul, option) { \ var $li = $('<li>', { text: option.label }); \ //var item = $(option.element).data('optionItem'); \ //if (item.style) $li.css(item.style); \ return $li.appendTo($ul); \ } \ }); \ \ $option.bugselectmenu('refresh'); \ \ When calling refresh, there is a null reference exception. \ jQuery Version 3.1.1 \ \ {{{#!js \ $.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.

Changed October 12, 2016 04:30PM UTC by scottgonzalez comment:2

resolution: → worksforme
status: newclosed

Changed October 12, 2016 04:35PM UTC by scottgonzalez comment:3

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