Sencha Touch Checkbox Defaults

Sencha Touch is amazing… simply amazing.  One of the things I’ve found very unintuitive for form panel configuration objects, though, is the checkbox and how to set a default value.

For most field types, you simply type value: 'some value'. With the checkboxfield, you instead have to use value: true to indicate what the value of a checkbox is when it is checked. The default state is then set by checked: true. It makes sense, but isn’t intuitive and perhaps a bit unnecessary to have both.


©2005-2017 Blog – Epiphany Digital is proudly powered by Badgers and Web Design is by Epiphany Digital
Entries (RSS) and Comments (RSS). 36 queries. 2.645 seconds.

Thank you for visiting this site. The web fairy will visit you in your sleep... you know, I was going somewhere with this, but it really doesn't have as much innocent charm as the tooth fairy, especially when I picture the web fairy as someone much like the Simpsons' Comic Book Guy but with wings. It's just not something I want.