Topic on Talk:OOUI

How I can binding widget to select?

2
37.45.167.171 (talkcontribs)

Hello. I want to add delete reasons by script.

OO.ui.DropdownWidget.static.infuse( $( '#' + $('#wpDeleteReasonList').parent().attr('id') ) ) .dropdownWidget.menu.addItems(new OO.ui.MenuOptionWidget({ data: data, label: label }), position);

It works fine, but when i choose one of my “custom reasons”, mediawiki not to provide it in delete log. For example, imgur.com/a/Bx9hb3m instead imgur.com/a/TI13zXT. What am I doing wrong?

37.45.167.171 (talkcontribs)

Sorry, wrong wikimarkup. I can’t edit previous message. My code:

OO.ui.DropdownWidget.static.infuse( $( '#' + $('#wpDeleteReasonList').parent().attr('id') ) ) .dropdownWidget.menu.addItems(new OO.ui.MenuOptionWidget({
    data: data,
    label: label
}), position);
Reply to "How I can binding widget to select?"