-
7 Jan 2013 4:39 AM #1
[4.2.0 beta] Ext.menu.CheckItem: minor inconsistency with checked
[4.2.0 beta] Ext.menu.CheckItem: minor inconsistency with checked
REQUIRED INFORMATION
Ext version tested:- Ext 4.2.0 beta
- FireFox
- <!DOCTYPE html>
- Just minor inconsistency with CheckItem. Its "checked" returns "undefined" before rendering, but "false" after.
- Sure, it is not a big deal, because we always can use !!checked.
- But, maybe, the getChecked method could be added which would always return a bool value.
- Run the script
- Click the "Get checked" button => undefined
- Click the "Menu" button
- Click the "Get checked" button => false
- false in the both cases.
- Before rendering - undefined, after rendering - false.
Code:Ext.create("Ext.button.Button", { id: "Button1", renderTo: Ext.getBody(), text: "Menu", menu: { items: { xtype: "menucheckitem", text: "Test item" } } }); Ext.create("Ext.button.Button", { renderTo: Ext.getBody(), text: "Get checked", handler: function () { alert(Ext.getCmp("Button1").menu.items.get(0).checked); } });
-
7 Jan 2013 9:01 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,656
- Vote Rating
- 435
Thanks for the report! I have opened a bug in our bug tracker.
Success! Looks like we've fixed this one. According to our records the fix was applied for
EXTJSIV-8167
in
4.2.0.265.


Reply With Quote