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

Different selectors on same template

Open rafaelcorreiapoli opened this issue 10 years ago • 11 comments

Hi, on my template i'm rendering my table two times but with different selectors

<template name="ferias">
        {{> tabular table=TabularTables.Ferias selector=coletiva class="table table-striped table-bordered table-hover" id="feriasColetivasDT" width="100%"}}

        {{> tabular table=TabularTables.Ferias selector=pessoal class="table table-striped table-bordered table-hover" id="feriasPessoaisDT" width="100%"}}
</template>
Template.ferias.helpers({
    coletiva: function(){
        return {tipo:'coletiva'};
    },
    pessoal:function(){
        return {tipo:'pessoal'};
    }   
})

Both tables are using the 'coletiva' selector for a strange reason...

rafaelcorreiapoli avatar Sep 08 '15 01:09 rafaelcorreiapoli

I intended to support rendering two instances at once but I've never tested it. I will have to test and fix.

aldeed avatar Sep 09 '15 19:09 aldeed

So the workaround for now would be declaring 2 different tabular instances?

rafaelcorreiapoli avatar Sep 09 '15 20:09 rafaelcorreiapoli

Yes probably. I will leave this issue open to investigate a fix.

aldeed avatar Sep 09 '15 20:09 aldeed

I'd throw a +1 in the ring for this too. I need to support multiple levels of drilldown all against the same datasource (unknown # of levels). It sounds like it won't be possible right now though. Thanks for a great product!

datanotion avatar Sep 24 '15 23:09 datanotion

I am also having issues with this, any recommendation?

jerocosio avatar Jan 13 '16 02:01 jerocosio

+1 would be very useful to be able to show multiple instances with different selectors in a template.

jowilhnson avatar Mar 30 '16 20:03 jowilhnson

+1

jdnichollsc avatar Jan 24 '17 16:01 jdnichollsc

+1

meetmagdalene avatar Apr 02 '17 19:04 meetmagdalene

+1

TheYarin avatar Jul 28 '17 16:07 TheYarin

+1

openp2pdesign avatar Jul 01 '18 14:07 openp2pdesign

Same problem also with two different tabular instances (with same collection), but my error was to use the same name for the two different instances of Tabular.Table, with two different names now it works well:

TabularTables.Projects = new Tabular.Table({
    name: "MyProjects",

openp2pdesign avatar Jul 01 '18 14:07 openp2pdesign