meteor-tabular icon indicating copy to clipboard operation
meteor-tabular copied to clipboard

Add footer to enable individual column searching

Open rolivav opened this issue 9 years ago • 6 comments

Adding footer is neccessary to have a search input inside the table. My idea was just to implement this example -> http://datatables.net/examples/api/multi_filter.html and add

tfoot {
    display: table-header-group;
}

to the CSS to get a table which would look like:

<thead></thead>
<tfoot></tfoot> -> with search inputs
<tbody></tbody>

Can I currently do that with tabular and without having to add the footer with jQuery? It can be done, but I would need to explicitly put the number of columns in the row of the footer, and in the original plugin is so much easier (since you have access to the DOM).

rolivav avatar Jan 18 '16 11:01 rolivav

Sorry, I closed it and reopened it a few times accidentally.

rolivav avatar Jan 18 '16 11:01 rolivav

By the way, I've seen this open issue https://github.com/aldeed/meteor-tabular/issues/110 . Although having a template for the footer would be great, adding a template for the datatable in general, not just the cell, would be the best thing. Is there any reason why this is not the default case? Thanks for the plugin, great work.

rolivav avatar Jan 18 '16 11:01 rolivav

+1

maka-io avatar Mar 16 '16 21:03 maka-io

+1

NilsDannemann avatar Apr 04 '16 06:04 NilsDannemann

Footer was added in v2

aldeed avatar Oct 30 '16 22:10 aldeed

@aldeed I am able to use footerCallback from datatable, but I see no footer in the table. I see

in the HTML.

Using this code, the calculation is done but nothing is displayed: https://datatables.net/examples/advanced_init/footer_callback.html

I have started to generate my tfoot on footerCallback with this kind of code: $("tfoot").html("

12")

Is there a better way to select the tfoot from element from the callback ?

lowi avatar Dec 02 '16 19:12 lowi