Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: [OPEN-139][3.0rc1] Bugs: Ext.ux.MultiSelect issues

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User mschwartz's Avatar
    Join Date
    Nov 2008
    Location
    San Diego, Peoples' Republic of California
    Posts
    2,061

    Default [OPEN-139][3.0rc1] Bugs: Ext.ux.MultiSelect issues

    1) doesn't honor anchor config option.
    2) Used in a dialog with frame: true, it's unusable as it renders wrong, uses css that isn't functional with the (default) blue background.

  2. #2
    Sencha User mschwartz's Avatar
    Join Date
    Nov 2008
    Location
    San Diego, Peoples' Republic of California
    Posts
    2,061

    Default

    destroy function should read this:

    Code:
        destroy: function(){
            this.fs.destroy();
            if (this.dragZone && this.dragZone.destroy) this.dragZone.destroy();
            if (this.dropZone && this.dropZone.destroy) this.dropZone.destroy();
            Ext.ux.Multiselect.superclass.destroy.call(this);
        }
    The bolded line is a typo in the rc-1 zip, examples directory.

  3. #3
    Sencha User mschwartz's Avatar
    Join Date
    Nov 2008
    Location
    San Diego, Peoples' Republic of California
    Posts
    2,061

    Default

    Oddly, ItemSelector seems to honor anchor. Set it to 100% and you get an overflow: auto set of scrollbars no matter what.

  4. #4
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,488

    Default

    mschwartz -

    Could you prepare a brief showcase for us? Are you using it in a FormLayout or another layout manager which supports anchoring?
    Aaron Conran
    @aconran

  5. #5
    Sencha User mschwartz's Avatar
    Join Date
    Nov 2008
    Location
    San Diego, Peoples' Republic of California
    Posts
    2,061

    Default

    Used in a FormPanel in a window. Window has frame: true, though I think I tried frame: true on the form itself.

    In either case, the background of the window/form is nice and blue, but the multiselect and itemselector render a white background much wider than the width/height settings.

    Looking at the css, there's a ux-mselect selector that doesn't seem to be used anywhere. I've hacked the sources to add that, and added some other css to fix it up.

  6. #6
    Sencha User mschwartz's Avatar
    Join Date
    Nov 2008
    Location
    San Diego, Peoples' Republic of California
    Posts
    2,061

    Default

    Here's a snippet of code.

    Code:
                        config.height = 200;
                        config.xtype = 'itemselector';
                        config.multiselects = [
                            {
                                width: 170,
                                height: 200,
                                valueField: 'classificationId',
                                displayField: 'name',
                                store: store,
                                listeners: {
                                    render: function() {
                                        this.store.load();
                                    }
                                }
                            },
                            {
                                width: 170,
                                height: 200,
                                valueField: 'classificationId',
                                displayField: 'name',
                                store: new Ext.data.ArrayStore({
                                    fields: [ 'classificationId', 'name' ]
                                })
                            }
                        ];
    I drag two items from the left multiselect to the right. Click on an item in the right, firebug stops at line 235 of MultiSelect.js with this error:

    this.store.getAt(selectionsArray[i]) is undefined

    If I add these lines to the store in the second multiselect, no error but I can't sort the right multiselect via drag & drop as it's supposed to.

    Code:
                                store: new Ext.data.ArrayStore({
                                    fields: [ 'classificationId', 'name' ],
                                    sortInfo: {
                                        field: 'name',
                                        direction: 'ASC'
                                    }
                                })

  7. #7
    Sencha User mschwartz's Avatar
    Join Date
    Nov 2008
    Location
    San Diego, Peoples' Republic of California
    Posts
    2,061

    Default

    The bug seems to be with Ext.DataView.

    I set a breakpoint at line 232 of MultiSelect.js:

    var selectionsArray = this.view.getSelectedIndexes();

    and step in.

    this.selected.elements contains an array of 1 item, dl.x-list-selected.

    the loop in getSelectedIndexes() has this line:

    indexes.push(s[i].viewIndex)

    I examine s[i] and there is no viewIndex member / undefined.

  8. #8
    Sencha User mschwartz's Avatar
    Join Date
    Nov 2008
    Location
    San Diego, Peoples' Republic of California
    Posts
    2,061

    Default

    I set a breakpoint inside DataView.js, updateIndexes.

    When dragging a 2nd item to the right MultiSelect, it's being called with startIndex = 2. I think this is why it's not setting viewIndex for the 2nd node (would be index = 1).

  9. #9
    Sencha User mschwartz's Avatar
    Join Date
    Nov 2008
    Location
    San Diego, Peoples' Republic of California
    Posts
    2,061

    Default

    and the bug is in MultiSelect.js at my line #521

    It should read:

    Code:
            var insertAt = (this.ms.appendOnly || (n == this.ms.fs.body.dom)) ? this.view.store.getCount()-1 : this.view.indexOf(n);
    The getCount()-1 returns the proper index. The original source returned just getCount().

  10. #10
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,488

    Default

    Thanks for the feedback, marking this as an open issue to take a look into.
    Aaron Conran
    @aconran

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •