We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Resize PivotView without Refresh all component (BUG)

I need to programmatically set Width and Height of PivotView. 
How can i do this without call method "Refresh", this method force recreate all component.

Other problem is, when i set Width and Height  and call Refresh(), the component start consuming memory indefinitely.

The problem is a spinner global timout cicle never stop even with class 'e-panel-hide' hiding the element.

I acn see the spinner but the execution of "function animateMaterial(spinnerInfo) { " never stop.

Thanks

1 Reply

SN Sivamathi Natarajan Syncfusion Team December 16, 2019 12:02 PM UTC

 
Thanks for contacting Syncfusion support. 
 
The method “refresh()” will destroy and re-render the entire control. Also, calling the method isn’t required where the control will be refreshed automatically while changing the “height” and “width” properties dynamically. So, remove the method then check the same. If you still facing the reported memory problem, then turn off (using setProperties option) the control refresh while changing the properties and call the method “layoutRefresh()” to refresh the control manually.  
 
We have prepared a sample with the above mentioned option for your reference which is available in the below link. 
 
Code Example: 
 var button = new ej.buttons.Button({ isPrimary: true }); 
    button.appendTo('#Refresh'); 
    button.element.onclick = function (args) { 
       if (pivotObj.height == 250 && pivotObj.width == '100%') { 
         pivotObj.setProperties({height:500,width: '80%'},true); 
       } 
       else if (pivotObj.height == 500&& pivotObj.width == '80%') { 
          pivotObj.setProperties({height:300,width: '50%'},true); 
       } 
       else { 
        pivotObj.setProperties({height:250,width: '100%'},true); 
       } 
       pivotObj.layoutRefresh(); 
    }; 
 
 
 
We hope that the above sample will meet your requirement. 
 
Regards, 
Sivamathi. 


Loader.
Live Chat Icon For mobile
Up arrow icon