PDA

View Full Version : Ext.ux.TokenField



chrisfarms
25 Jun 2011, 5:05 PM
Hey People,

Looks like I'm going to be working on a Sencha Touch project for next couple of months, so I should have some time to try and contribute back anything generic than I end up building.

I've started an Ext.ux repository (https://github.com/chrisfarms/Ext.ux) with the aim of neatening up and documenting something once a week, so the first to have an example written for it is:

Ext.ux.TokenField

https://a248.e.akamai.net/assets.github.com/img/ced00d8562419f516d1924f0b01aef5468f5b055/687474703a2f2f646c2e64726f70626f782e636f6d2f752f32323531393233362f53637265656e73686f74732f30762e706e67

Used to represent comma seperated text fields for things like tags or categories.

let me know what you think, and more to come as they are built/documented...

nb: a couple of the items in the Ext.ux repo are from other people on this site, (BufferedList and MultiSelect) there just there as I needed to modify them a bit, I'll probably write them up too.

mitchellsimoens
26 Jun 2011, 7:55 AM
I like the look of this first one! Do you have to tap on the "x" to remove and have you found that it is hard to tap?

chrisfarms
26 Jun 2011, 8:36 AM
Thanks.... Ah yes, I tried to add a focus() event, but hadden tested in iOS, that call was tripping up the 'tap' event. Fixed now, so should just take a quick tap anywhere on the bubble to kill it.

Will have to find another way to bring focus to the field.

mitchellsimoens
26 Jun 2011, 8:38 AM
The problem with killing the bubble with tapping anywhere on it is that people may be expecting to select the bubble. May need to delegate the tap event on the el of the "x"

chrisfarms
26 Jun 2011, 8:57 AM
Yeah I kept changing my mind, trade-off between a fiddly hit-area and accidental deletes.

I've added an option to choose between the two by setting `largeTapArea:true` so you can choose.

mitchellsimoens
26 Jun 2011, 8:59 AM
Yeah I kept changing my mind, trade-off between a fiddly hit-area and accidental deletes.

I've added an option to choose between the two by setting `largeTapArea:true` so you can choose.

Fantastic! A little promotion thing you can do is add your stuff to your signature :)) Then no matter where you post, it will be on every post