Results 1 to 2 of 2

Thread: extjs 4 show mask while check/uncheck nodes

  1. #1

    Default

    im trying to check/uncheck specific node and its child nodes as below it is working. Except loading mask. i don't know what is the problem. why not show the mask ?

    Code:
    onTreepanelCheckChange: function(node, checked, eOpts) {    
    tree.setLoading( 'Wait...' );    
    node.cascadeBy( function( n ) {        
    n.set( 'checked', checked );        
    if( n.data.p_id !== 0 ) n.expand();    
    } );    
    tree.setLoading( false );
    }
    I've tried to use tree.suspendLayouts(); before cacadeBy function but result is same

  2. #2
    Sencha Premium Member glopes's Avatar
    Join Date
    Jan 2013
    Location
    Chicago
    Posts
    123
    Answers
    16

    Default

    Hi,

    You should add a little delay to give time for your mask to show up.

    Code:
    onTreepanelCheckChange: function(node, checked, eOpts) {
        tree.mask('Wait...');
        Ext.defer(function(){
            node.cascadeBy( function( n ) {
                n.set( 'checked', checked );
                if( n.data.p_id !== 0 ) n.expand();
            } );
            tree.unmask();
        },100);

Tags for this Thread

Posting Permissions

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