Results 1 to 3 of 3

Thread: [5.0.1] User extension childEls are null

    Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha Premium Member
    Join Date
    Apr 2013
    Posts
    20

    Default [5.0.1] User extension childEls are null

    Hello !

    I want to extend Ext.form.field.Text to add an example text below the input.

    Here is the code :

    Code:
    Ext.define('Ext.ux.form.field.Example', {    
        extend: 'Ext.form.field.Text',    
    
        childEls: ['exampleEl'], 
       
        afterSubTpl: ['<span id="{id}-exampleEl">This is an example !</span>'],
     
        afterRender: function() {
            var me = this;
            me.callParent(arguments);
            console.log(me.exampleEl);    
    }});
    I want then access to the exampleEl but it is always null

    Any idea why ?
    Thanks !

    EDIT : You can reproduce the problem is this fiddle
    Last edited by archimed-isv; 17 Oct 2014 at 6:03 AM. Reason: Fiddle added

  2. #2
    Sencha User slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,165

    Default

    Hi,

    In Ext 5.x you'll use the "data-ref" attribute to marry elements to childEl references, which is a change from 4.x.

    See the example here:

  3. #3
    Sencha Premium Member
    Join Date
    Mar 2014
    Posts
    60

    Default

    This information is not in any of the documentation, which still points to broken examples of how childEls are supposed to work (unless I missed it? but I'm looking at the 5.1 api docs). I don't see it in the upgrade guide either.

    I think that still counts as a bug (of the documentation), no?

Posting Permissions

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