Please, I can't figure it out / Aslagle Reactive Table - Show only the row with this._id


#1

Hello everyone. I’m working with aslagle:reactive-table to display my collection.
Each key on my collection looks like this:

{
  "_id": "oQ6K3FFNYhiaXhSt4",
  "reference": XXXXXX,
  "type": "type",
  "n_beds": "n_beds",
  "price": XXXX,
  "departement": "departement",
  "city": "city",
  "street_name": "street_name",
  "l_surface": XXX,
  "is_exclusive": true/false
}

I’m displaying everysingle key in a clickable list that refers to <a href="tables/:_id"/>
My problem is that Reactive Table is showing everysingle key instead of just showing the one with this._id.
I can console.log this._id and I was able to use {{#quickRemoveButton}} to delete the row with this._id. with the following:

 return function (collection, id) {
          var doc = collection.findOne(id);
          console.log(doc)
          if (confirm('Confirm?')) {
              console.log(this)
            this.remove();
            history.back();
          }
        }   }

But I can’t manage to code it with the table.
This is my table settings:

 tableSettings: function () {
        return {
            //rowsPerPage: 1,
            showFilter: false,
            showRowCount: true,
            showNavigation: 'never',
            id: 'this._id' // trying to use the id in the docs setting section
        };
      },

my table.html

<template name="tables">
    <div>
        <button class="btn btn-back" id="voltar">Voltar</button>
        {{#quickRemoveButton collection="Adverts" _id=this._id beforeRemove=beforeRemove class="btn btn-danger" id="apagar"}}Apagar Imovel{{/quickRemoveButton}}
    </div>
    <div>
        {{> reactiveTable id=this._id settings=tableSettings collection=table id='{{this._id}}' }}
    </div>

Hope that someone can help me, thanks in advance :smile: