-
9 Dec 2010 3:34 AM #1
[OPEN-650] checkbox checked state is set after firing the event
[OPEN-650] checkbox checked state is set after firing the event
I'm using sencha-touch-debug-w-comments.js v1.0. Putting a checkbox control next to each item list was a bit tricky and I had to do a workaround.
I used the itemTpl property of the List control with the tpl looking like:
and theHTML Code:<textarea id="todos-template" class="x-hidden-display"> <div id="todo_item_{todo_id}" class="todo_list"> <input type="checkbox" id="todo_check_{todo_id}" class="todo_checkbox unchecked"/> <strong>{title}</strong> </div> </textarea>
So on tapping the list item, I detect whether the checkbox is tapped. However, due to a BUG the ele.getAttribute('checked')Code:itemtap: function(dataview, index, item, event) { var todo = dataview.store.getAt(index).data; if (eve.getTarget('input#todo_check_'+todo.todo_id)) { Ext.get(item).addCls('selected'); ele = Ext.get('todo_check_'+todo.todo_id); //reverse condition as the event is fired before the state is set if(!ele.getAttribute('checked')) { todo.completed_at = Api.formatDate(new Date()); ele.replaceCls('unchecked', 'checked'); } else { ele.replaceCls('checked', 'unchecked'); todo.completed_at = null; } }
is updated after the itemtap handler function is called.
Shouldn't the 'checked' state be updated before the itemtap handler function is called?
-
21 Jan 2011 10:19 AM #2
Thank you for reporting this bug. We will make it our priority to review this report.
Similar Threads
-
setValue set the value but checkbox is not checked in list (lovcombo)
By amanind in forum Ext 3.x: User Extensions and PluginsReplies: 0Last Post: 23 Sep 2010, 4:03 AM -
CheckBox checked always set to true in form
By Asken in forum Ext 3.x: Help & DiscussionReplies: 0Last Post: 13 Jul 2010, 10:54 PM -
[FEATURE REQUEST] Checkbox checked state
By Mango_lier in forum Community DiscussionReplies: 0Last Post: 10 Jun 2009, 3:15 PM -
[2.2][DUP][FIXED] Checkbox transformed from el doesn't show checked state correctly
By saJoshua in forum Ext 2.x: BugsReplies: 3Last Post: 7 Aug 2008, 4:24 AM -
checkbox event firing
By rmauser in forum Ext 1.x: Help & DiscussionReplies: 0Last Post: 24 Jun 2007, 8:49 PM


Reply With Quote