Results 1 to 3 of 3

Thread: LabelClsExtra in defaults config not working

  1. #1
    Sencha User
    Join Date
    Sep 2012
    Location
    Jakarta, Indonesia
    Posts
    9
    Vote Rating
    0
      0  

    Default LabelClsExtra in defaults config not working

    I'm creating this code below

    Code:
    <style>
    .red { color: #ff0000; }
    </style>
    <script>
    Ext.onReady(function(){				
    	Ext.create('Ext.form.Panel', {
    		width: 350,
    		bodyPadding: 10,
    		renderTo: Ext.getBody(),
    		title: 'Login',
    		defaults: {			
    			labelClsExtra: 'red',
    			labelAlign: 'top',
    			labelSeparator: ' ',
    			anchor: '100%'
    		},
    		items: [
    			{ xtype: 'textfield', fieldLabel: 'User Name' },
    			{ xtype: 'textfield', fieldLabel: 'Password', inputType: 'password' }
    		]
    	});
    });
    
    </script>
    with ExtJS 4.1.1, the field labels turn to red, but not with 4.2 version. Is the labelClsExtra in defaults config not supported anymore?

  2. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,154
    Vote Rating
    247
      0  

    Default

    The 'red' class is added to the label element still, but you may have to modify the CSS rule you're using for the label as the underlying markup may have changed between versions.

    Or even just adding an important! may solve it.

    But, the class is still being applied to the label element.

  3. #3
    Sencha User
    Join Date
    Sep 2012
    Location
    Jakarta, Indonesia
    Posts
    9
    Vote Rating
    0
      0  

    Default

    I added !important to the style and it works. Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •