sencha touch 2 - Two lists same container same store -


i got class i'm trying show data same store in same container. did way because want have 2 rows each on separate line , not having control on them. here's class:

ext.define('clue.view.listquestions', { extend: 'ext.container', requires: ['ext.dataview.list'], xtype: 'listquestions',   config: {     id: 'listquestions',     items: [{          xtype: 'list',          id: 'questionli1',          basecls: 'questionli1',          flex: 1,          store: {              xtype: 'levelstore',              filters: [{                  filterfn: function(item) {                      return item.data.levelid < 2 && item.data.questionid < 6;                  }              }]          },          itemtpl: '<div>{questionid}</div>'      },{         xtype: 'list',         id: 'questionli2',         basecls: 'questionli2',          flex: 1,         store: {             xtype: 'levelstore',             filters: [{                 filterfn: function(item) {                     return item.data.levelid < 2 && item.data.questionid > 5;                 }             }]         },         itemtpl: '<div>{questionid}</div>'     }] }  })  

if remove second list, first list showing, otherwise first list not showing. i'm doing wrong ? here's store:

ext.define('clue.store.lquestions', { extend: 'ext.data.store', xtype: 'levelstore', requires: ['ext.data.proxy.localstorage'],  config: {     model: 'clue.model.lquestions',     storeid: 'levelstore',     sorters: [{         property: 'levelid',         direction: 'asc'     }],     proxy: {         type: 'localstorage',         id:   'levelstorage'     } } })     

other details

i added css on questionli1 , questionli2 , items. 3px red border. lists taking space in first list elements not there ( not in html ) second list rendered fine. if put console.log() in first filterfn function nothing shows up.. thinking maybe overwrite something...

this get

both lists active

and if do:

...  flex: 1,  /*store: {       xtype: 'levelstore',       filters: [{           filterfn: function(item) {                return item.data.levelid < 2 && item.data.questionid > 5;           }       }]         },*/  itemtpl: '<div>{questionid}</div>' ... 

on second list enter image description here

adding flex config component works if specify vbox of hbox layout parent so

    ext.create('ext.container', {         fullscreen: true,         layout: 'vbox',         items: [{             xtype: 'list',             itemtpl: '{title}',             flex: 1,             data: [                 { title: 'list 1: item 1' },                 { title: 'list 1: item 2' },                 { title: 'list 1: item 3' },                 { title: 'list 1: item 4' }             ]         }, {             xtype: 'list',             itemtpl: '{title}',             flex: 1,             data: [                 { title: 'list 2: item 1' },                 { title: 'list 2: item 2' },                 { title: 'list 2: item 3' },                 { title: 'list 2: item 4' }             ]         }]     }); 

sencha fiddle


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -