Type error on selecting an option from Picker

edited May 2014 in Newbie Questions
I have a PickerDecorator inside an accordion. Here is the code for the picker.

        {
            name:"RangePicker",
            kind:"FittableColumns",
            style:"width:33%; padding: 0 5px;",
            components:[
                {
                    name: "DropDownLabel",
                    content: "Range:",
                    style:"width:100px;padding: 8px 4px;"
                },
                {
                    name:"DropDownPicker",
                    kind: "onyx.PickerDecorator",
                    fit: true,
                    style:"max-width: 175px; min-width: 122px;",
                    components: [{
                        name:"DropDownPickerButton",
                        classes: "eventRangePicker"
                    }, {
                        name: "DropDownPickerContent",
                        kind: "onyx.Picker",
                        components: [
                        ]
                    }]
                }
            ]
        },
I am adding components to the picker Dynamically based on the Ajax response I get. Here is the code for that:

_.each(this.timeOptionsData, function(options, index){
            if(index === 0){
                var rangeOptions = this.$.DropDownPickerContent.createComponent(
                    {content: options.value, active: true}
                );
            }else{
                var rangeOptions = this.$.DropDownPickerContent.createComponent(
                    {content: options.value}
                );
            }
        },this);
        this.$.DropDownPickerContent.render();
        this.resized();
Sorry for throwing all the code at you. Just wanted to provide as much as possible to check.
When I try to select an option, the entire Accrodion disappears and I get the following error in the console.

Uncaught TypeError: Cannot read property 'setShowing' of undefined

Any advice as to what I am doing wrong?

Comments

Sign In or Register to comment.