Opened 10 years ago

Closed 10 years ago

#14753 closed defect (fixed)

Inconsistent behaviour when settings options on a dijit.form.Select

Reported by: Simon Dahlberg Owned by: Douglas Hays
Priority: undecided Milestone: 1.8
Component: Dijit - Form Version: 1.7.1
Keywords: Cc:
Blocked By: Blocking:


setting options with select.set("options") only work the first time. When options is set later, items in the dropdown list is not updated.

OS: Mac OSX 10.7 Firefox 10.0, Chrome 16.0.912.77

A jsFiddle to demonstrate the code below

], function(ready, Select, Button, connect) {
    var l1 = [
        { label: "opt1", value: "1"},
        { label: "opt2", value: "2"},
        { label: "opt3", value: "3"}
    var l2 = [
        { label: "opt4", value: "4"},
        { label: "opt5", value: "5"},
        { label: "opt6", value: "6"}
    ready(function() {
        var select = new Select({
        }, "select");
        var btnL1 = new Button({}, "btnL1");
        var btnL2 = new Button({}, "btnL2");
        var btnRun = new Button({}, "btnRun");
        connect.connect(btnL1, "onClick", function(e) {
            console.log("set options to l1");
            select.set("options", l1);
        connect.connect(btnL2, "onClick", function(e) {
            console.log("set options to l2");
            select.set("options", l2);

Change History (2)

comment:1 Changed 10 years ago by Douglas Hays

Milestone: tbd1.8
Status: newassigned

comment:2 Changed 10 years ago by Douglas Hays

Resolution: fixed
Status: assignedclosed

In [28011]:

Fixes #14753. Clear _isLoaded when options are changed to cause a reload.

Note: See TracTickets for help on using tickets.