rally - Filter Options: All selection -
i have created filter based upon state grid. however, cannot figure out way see tasks regardless of state. there way add together alternative filter show tasks states? code have far
xtype : 'rallyfieldvaluecombobox', itemid : 'statecombobox', fieldlabel : 'filter state:', model : 'task', field : 'state', listeners : { select : this._onselect1, ready : this._onload1, scope : }
here 1 way of doing it. in combobox set allownoentry: true
, , utilize in place of "all". when noentry selected combobox returns null. check status in _getstatefilter
.
if combobox returns null _getstatefilter
returns empty filter, removes filtering state , returns tasks regardless of state value.
ext.define('customapp', { extend: 'rally.app.app', componentcls: 'app', launch: function() { this.add({ xtype: 'rallyfieldvaluecombobox', itemid: 'statecombobox', fieldlabel: 'filter state:', model: 'task', field: 'state', allownoentry: true, listeners: { select: this._onselect, ready: this._onload, scope: } }); }, _onload: function() { this.add({ xtype: 'rallygrid', columncfgs: [ 'formattedid', 'name', 'state' ], context: this.getcontext(), storeconfig: { model: 'task', context: this.context.getdatacontext(), filters: [this._getstatefilter()] } }); }, _getstatefilter: function() { if (!this.down('#statecombobox').getvalue()) { homecoming {} } else{ homecoming { property: 'state', operator: '=', value: this.down('#statecombobox').getvalue() }; } }, _onselect: function() { var grid = this.down('rallygrid'), store = grid.getstore(); store.clearfilter(true); store.filter(this._getstatefilter()); } });
rally
No comments:
Post a Comment