3 Attachment(s)
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
Attachment 41435
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
},
Attachment 41436