-
29 Apr 2012 4:58 PM #1
Jarvus.field.ListPicker
Jarvus.field.ListPicker
I needed something like the selectfield but that could accomodate a huge number of values, I refactored the official DatePicker classes so that I could build on top of their functionality. This field will show a fullscreen sheet when touched containing an Ext.List with grouping and indexbar enabled. It should be easy at this point to add find-as-you-type filtering and I may do it in a future update.
Here is the code in case it would be helpful to anyone, I'd also be curious to hear someone from Sencha's take on how I gutted DatePicker and if they'd consider splitting them in future releases so the pseudofield->sheet model can be easily built-on by developers
https://github.com/JarvusInnovations...eld.ListPickerLast edited by themightychris; 30 Apr 2012 at 8:27 AM. Reason: added screenshot
-
29 Apr 2012 11:30 PM #2
Any screenshots?
Thanks for sharing your work.
-
30 Apr 2012 8:28 AM #3
I just attached a screenshot to the top post
-
24 May 2012 2:07 PM #4
-
27 May 2012 9:13 AM #5
-
27 May 2012 10:04 AM #6
Hi,
Here is the tutorial:
1st: Create a sample project:
Go to your sdk folder:
$ sencha app create jarvus-tutorial ~/Sites/jarvus-tutorial
$ cd ~/Sites/jarvus-tutorial
2nd - Download jarvus files
$ cd ~/Download
$ git clone https://github.com/JarvusInnovations...ListPicker.git
$ cd Jarvus.field.ListPicker
3rd - Make changes
Create folder
$ mkidr ~/Sites/ jarvus-tutorial/app/view/jarvus
Copy jarvus files to your project.
$ cp -rf field picker ~/Sites/jarvus-tutorial/app/view/jarvus/
Modify namespace.
4th - Create model
5th - Modify Main.jsCode:Ext.define('jarvus-tutorial.model.Contact', { extend: 'Ext.data.Model', config: { fields: ['id', 'name'] } });
Code:Ext.define("jarvus-tutorial.view.Main", { extend: 'Ext.Panel', requires: [ 'jarvus-tutorial.model.Contact', 'jarvus-tutorial.view.jarvus.field.ListPicker' ], config: { items: { xtype: 'listpickerfield', valueField: 'id', displayField: 'name', store: { model:'jarvus-tutorial.model.Contact', sorters: 'name', grouper: { groupFn: function(record) { return record.get('name')[0]; } }, data: [ { id: '1', name: 'Tommy Maintz' }, { id: '2', name: 'Rob Dougan' }, { id: '3', name: 'Ed Spencer' }, { id: '4', name: 'Jamie Avins' }, { id: '5', name: 'Aaron Conran' }, { id: '6', name: 'Dave Kaneda' }, { id: '7', name: 'Jacky Nguyen' }, { id: '8', name: 'Abraham Elias' }, { id: '9', name: 'Jay Robinson'}, { id: '10', name: 'Nigel White' }, { id: '11', name: 'Don Griffin' }, { id: '12', name: 'Nico Ferrero' }, { id: '13', name: 'Jason Johnston'} ] }, grouped: true } } });
regards,
-
30 May 2012 4:57 PM #7
thx, I'm using this component on my app and work great

I have idea to add search box on top of the list so we can do searching also, but I'm still working on it not finished yet.
thx
-
4 Aug 2012 5:54 PM #8
I forgot to mention that it takes the same options as selectfield, thanks for putting the example together egatjens!
-
7 Aug 2012 6:45 PM #9
can the picker be destroyed after hidding?
can the picker be destroyed after hidding?
I inspect the dom. The picker is still there as a actionsheet does.
Can the picker be destroyed?
Thanks.
-
24 Sep 2012 5:14 AM #10
Thanks, great extension!
However, in Sencha Touch 2.1.0-b3 the list does not show up, when one clicks a select field (listpickerfield). Only the 'clear' and 'cancel' buttons are shown. In Sencha Touch 2.0.1 everything works fine.
Who is able to help with this? Thanks in advance!


Reply With Quote
