aslagle / reactive-table

A reactive table designed for Meteor
https://atmospherejs.com/aslagle/reactive-table
Other
328 stars 138 forks source link

injecting spacebar output into a row cell ? #473

Open tomvolek opened 6 years ago

tomvolek commented 6 years ago

HI All : I have a reactive-table, which value of one it's cells is a bar code number. I use the package https://github.com/xvendo/barcoder to generate the bar code pictures using the spacebar statement bellow in the HTML. How can i insert this bar code picture in the table cell after the table is generated in the HTML code ?

{{> xvendo_barcoder id="idme" ean="1234567890123"}}

Thanks Tom

aslagle commented 6 years ago

You can make one of your fields in the table use a barcode template.

{ key: 'barcode', label: 'Barcode', tmpl: Template.barcode }

To create the barcode template, assuming each item in your collection has a barcode and an id, you'd do something like this:

<template name="barcode">
  {{> xvendo_barcoder id=id ean=barcode }}
</template>