You found a bug! We've classified it as DSGNR-3604 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #11
    Sencha Premium Member intellix's Avatar
    Join Date
    Mar 2012
    Location
    UK + Malta
    Posts
    263
    Vote Rating
    18
    intellix will become famous soon enough

      0  

    Default


    neither this.setScrollable(null); nor component.setScrollable(null); works, I'm sure this was highlighted in another thread :P

    Code:
    Ext.define('MyApp.view.MyContainer', {
        extend: 'Ext.Container',
    
    
        config: {
            items: [
                {
                    xtype: 'dataview',
                    itemId: 'mydataview',
                    scrollable: false,
                    itemTpl: [
                        '<div>{key} {value}</div>'
                    ],
                    store: 'MyStore',
                    listeners: [
                        {
                            fn: function(component, eOpts) {
                                this.setScrollable(null);
                                // component.setScrollable(null);
                                console.log('init');
                            },
                            event: 'initialize'
                        }
                    ]
                }
            ]
        }
    
    
    });
    The only way currently to develop in Architect is to have Sublime up, save and then find/replace scrollable: false with scrollable: null upon save.

    I'm sorry to harp on about it, but for a $400 application that's at least 2 months behind ST releases and almost always useless for some reason. I love the concept but it's just never quite there.

  2. #12
    Sencha - Architect Dev Team jjohnston's Avatar
    Join Date
    Sep 2010
    Posts
    284
    Vote Rating
    5
    jjohnston will become famous soon enough

      0  

    Default


    Thanks for the pointer. Here's the actual console log message, for reference:

    "This container is set to scrollable: false but has no specified height. You may need to set the container to scrollable: null or provide a height."

    I don't know the specifics of your situation but it sounds like you can use a height (or a layout on its parent that gives it a height) as an alternative to setting null.

    If you really need to set scrollable to null, then you can also try promoting your dataview to a class and overriding its applyScrollable method to return null.

    (We do recognize the inability to set null is an Architect bug, I'm just trying to give you some short-term workarounds.)
    Jason Johnston
    @lojjic
    Sencha Architect Development Team

  3. #13
    Sencha Premium Member intellix's Avatar
    Join Date
    Mar 2012
    Location
    UK + Malta
    Posts
    263
    Vote Rating
    18
    intellix will become famous soon enough

      0  

    Default


    Cool, I wasn't aware that setting card or fit on it's parent gave it a height, thanks

    It seems this is actually the same thread where we spoke about setScrollable(null) not working :P

  4. #14
    Touch Premium Member BostonMerlin's Avatar
    Join Date
    Aug 2010
    Location
    Boston
    Posts
    414
    Vote Rating
    34
    BostonMerlin has a spectacular aura about BostonMerlin has a spectacular aura about BostonMerlin has a spectacular aura about

      0  

    Default


    Jason, the problem I'm experiencing is detailed in the posts I linked back to. Setting height is not an option when you have multiple dataviews sitting on a vertically scrolling container and you don't know the height until runtime and even then, rows that wrap change the dataview height. These dataviews used to expand to the content within them when scrollable was set to false but stopped prior to the latest production ST build. John.

  5. #15
    Sencha Premium Member intellix's Avatar
    Join Date
    Mar 2012
    Location
    UK + Malta
    Posts
    263
    Vote Rating
    18
    intellix will become famous soon enough

      0  

    Default


    Was hoping to see this in the latest version but still not possible

  6. #16
    Sencha - Architect Dev Team jjohnston's Avatar
    Join Date
    Sep 2010
    Posts
    284
    Vote Rating
    5
    jjohnston will become famous soon enough

      0  

    Default


    Thanks for bearing with us on this one, folks.

    We have a long-term solution in place, but right now it looks too risky to put out as a patch to the 2.2.x line. In the meantime, the following seems to be a decent workaround:

    - For each dataview this applies to, make sure it is promoted to a class.
    - Add a function to the class named "applyScrollable"
    - As the body of that function, enter "return null;"

    This overrides the apply method for the scrollable config, which intercepts it before it gets used by anything, and forces its value to null. The only downside is that you can't add methods to child components so it has to be promoted to a class, but hopefully that's an acceptable tradeoff for now.
    Jason Johnston
    @lojjic
    Sencha Architect Development Team

  7. #17
    Sencha User
    Join Date
    Jul 2012
    Posts
    36
    Vote Rating
    0
    tyladurdan is on a distinguished road

      0  

    Default Workaround?

    Workaround?


    I tried
    Code:
    scrollable: 0
    and it worked for me. Perhaps this is a workaround?

    :-)