Results 1 to 5 of 5

Thread: [4.1.0 b2] Button html config not working

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha Premium Member
    Join Date
    Sep 2009
    Posts
    101
    Vote Rating
    1
      0  

    Default [4.1.0 b2] Button html config not working

    How to reproduce:

    This no longer works (html config option does not appy)
    Code:
    Ext.create('Ext.Button', {
     scale   : 'large',
    cls        : 'mash_button',
      html    : '<div class="menu-button"><img class="icon" src="images/icons/icon.png" ><div class="content"><div class="title">Button</div><span class="text">Some text here</span></div></div>'
                                                     });
    And this will work ( but height for html contents is not calculated properly):

    Code:
    Ext.create('Ext.Button', {    
     scale   : 'large',
    cls        : 'mash_button',
    text  : '<div  class="menu-button"><img class="icon" src="images/icons/icon.png"  ><div class="content"><div  class="title">Button</div><span class="text">Some text  here</span></div></div>'
                                                     });
    Is this intended behavior? Documentation states html config should be supported and working.

    Thank you

  2. #2
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,026
    Vote Rating
    1367
      0  

    Default

    The text config is the supported config. The html config will likely not have much affect.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  3. #3
    Sencha Premium Member
    Join Date
    Sep 2009
    Posts
    101
    Vote Rating
    1
      0  

    Default

    Well, this is what the docs say for 4.1.0 b2:

    html : String/ObjectAn HTML fragment, or a DomHelper specification to use as the layout element content. The HTML content is added after the component is rendered, so the document will not contain this HTML at the time the render event is fired. This content is inserted into the body before any configured contentEl is appended.
    Defaults to: ""

    So I am assuming html is supported config param?

    It used to work in 4.0.X series, so I think it should work in 4.1.x

    Thanks

  4. #4
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,026
    Vote Rating
    1367
      0  

    Default

    It's inherited by it's superclass Ext.Component
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  5. #5
    Sencha Premium Member
    Join Date
    Sep 2009
    Posts
    101
    Vote Rating
    1
      0  

    Default

    Ok, so this option is no longer supported?

Posting Permissions

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