Problem rendering tablesorter inside accordion

Hello!

Recently I've been experimenting with Blazor WASM and a few SF controls, and came up with an SfAccordion problem:
  1. When I tried to add tablesorter.js script to the page as an accordion item, the table wasn't rendered at all, but if I put the same div, with the same id outside of SfAccordion control, it renders properly. I haven't tried adding any other scripts/libs inside accordion, so I'm not sure if that's just tablesorter's problem, or a general one, but I predict it might have something to do with the querySelector.
  2. I've also had performance problems with SfGrid put inside SfAccordion, but I've posted that on the Grid thread, but with the samem example project that I attached here.
I have attached an example project. I've ran it using the BlazorApp.Server project, and the same runtime configuration instead of IIS.

Attachment: BlazorApp_71bae250.7z

4 Replies 1 reply marked as answer

AK Alagumeena Kalaiselvan Syncfusion Team September 10, 2020 04:44 PM UTC

Hi Tomasz, 

Thanks for contacting Syncfusion support. 

We have checked your reported issue with your shared sample and we suggest you use Expanded property as true for Accordion items which have content as tablesorter. Refer the below code that. 

<SfAccordion> 
        <AccordionItems> 
            <AccordionItem Header="tablesorter should render inside" Expanded="true">    // To Show tablesorter 
                <ContentTemplate> 
                    <div id="tablesort"></div> 
                </ContentTemplate> 
            </AccordionItem> 
            ... 
        </AccordionItems> 
    </SfAccordion> 

Also we modified your shared sample for reference which can be get by the below link. 

Please check with above sample and get back to us, if you need further assistance. 

Regards 
Alagumeena.K 



TO Tomasz September 11, 2020 06:36 PM UTC

Thanks for the reply.
Setting expanded property works fine, but is there any other way to have the tablesorter rendered when the accordion item is closed ?



AK Alagumeena Kalaiselvan Syncfusion Team September 14, 2020 09:49 AM UTC

Hi Tomasz, 

Thanks for your update. 

We have checked your reported case “Need to load accordion content at initial load” and we considered this requirement as improvement also logged the feature request for that which can tracked from the below link. 

We will implement your request in our volume 3 main release which may expected to be Scheduled at end of September, 2020. 

Regards 
Alagumeena.K 



VM Vengatesh Maniraj Syncfusion Team October 7, 2020 09:20 AM UTC

Hi Tomasz, 

We are glad to announce that our Essential Studio 2020 Volume 3 Release v18.3.0.35  is rolled out and in that release, We've Introduced a property LoadOnDemand to decide whether all the accordion contents are rendered on initial load and maintained in DOM. So please update your package to this version to include the feature. 


We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance. 

Regards, 
Vengatesh  


Marked as answer
Loader.
Up arrow icon