Threaded View

    Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-3929 in a recent build.
  1. #1
    Touch Premium Member
    Join Date
    Apr 2011
    Location
    Cary, NC
    Posts
    135
    Vote Rating
    0
    ChrisWalker is on a distinguished road

      0  

    Default Dataview will not scroll horizontally if using components as dataitems

    Dataview will not scroll horizontally if using components as dataitems


    If I set the dataview to use inline wrap = false, the items will do as the documentation states for the dataview's inline config option (2.1.1 docs) if I use theitemTpl config option:
    "When set to true the items within the DataView will have their display set to inline-block and be arranged horizontally. By default the items will wrap to the width of the DataView. Passing an object with { wrap: false } will turn off this wrapping behavior and overflowed items will need to be scrolled to horizontally."

    Code:
    {
      xtype: 'dataview',
      flex: 1,
      defaultType: 'MonitorItem_Tablet',
      scrollable: 'horizontal',
      deferEmptyText: false,
      inline: {
        wrap: false
      },
       itemTpl: [
          '<div>{name}</div>'
       ],
      store: 'goodMonitorStore',
      useComponents: false


    SenchaArchitect2.PNG

    The overflowed monitors can be seen by scrolling horizontally.

    However if I switch this dataview to use components it appears to wrap the items:

    Code:
    { xtype: 'dataview',
     flex: 1,
    defaultType: 'MonitorItem_Tablet',
    scrollable: 'horizontal',
    deferEmptyText: false,
    inline: {
       wrap: false
    },
    itemTpl: [
        '<div>{name}</div>'
    ],
    store: 'goodMonitorStore',
    useComponents: true
    },


    SenchaArchitect1.PNG
    Attached Images
    Last edited by ChrisWalker; 22 Jan 2013 at 7:52 AM. Reason: typo