ERPNext Conference 2019* ERPNext.com Blog

Show DataTable Under the Section Break Collapsible


#1

Hi
I want to Load DataTable inside the Collapsible Section Break. but by default whenever page loads it get loaded into the particular field inside the section break.

I want to load the datataable whenever the section break is clicked and then show the datatable.
And also i want to apply pageination on the datatable.
Please Help as its very important.


#2

@hari.kishor did you figure it out? i have the same problem :slight_smile:


#3

@wookiefc yes i found the solution.
you can use below code for this

var fee_log_section_head = $(’.section-head’).find(“a”).filter(function() {
return $(this).text() == “Section Name”;
}).parent();

fee_log_section_head.click(function(e) {
    e.stopPropagation();
    e.stopImmediatePropagation();
    var check_collapsed = $(this).hasClass("collapsed");
    if (!check_collapsed) {

    }
}) 

Thanks