{"action":"reopened","issue":{"url":"https://api.github.com/repos/aldeed/meteor-tabular/issues/272","repository_url":"https://api.github.com/repos/aldeed/meteor-tabular","labels_url":"https://api.github.com/repos/aldeed/meteor-tabular/issues/272/labels{/name}","comments_url":"https://api.github.com/repos/aldeed/meteor-tabular/issues/272/comments","events_url":"https://api.github.com/repos/aldeed/meteor-tabular/issues/272/events","html_url":"https://github.com/aldeed/meteor-tabular/issues/272","id":133699550,"number":272,"title":"question: ","user":{"login":"abate","id":106752,"avatar_url":"https://avatars.githubusercontent.com/u/106752?v=3","gravatar_id":"","url":"https://api.github.com/users/abate","html_url":"https://github.com/abate","followers_url":"https://api.github.com/users/abate/followers","following_url":"https://api.github.com/users/abate/following{/other_user}","gists_url":"https://api.github.com/users/abate/gists{/gist_id}","starred_url":"https://api.github.com/users/abate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abate/subscriptions","organizations_url":"https://api.github.com/users/abate/orgs","repos_url":"https://api.github.com/users/abate/repos","events_url":"https://api.github.com/users/abate/events{/privacy}","received_events_url":"https://api.github.com/users/abate/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-15T12:22:56Z","updated_at":"2016-02-15T13:22:51Z","closed_at":null,"body":"Raaa : the title should be something like : how to model non reactive data grid.\r\n\r\nI want to create a large table (300 rows x 300 columns) where each cell is a small dropdown with 3 values. My collection is composed by 300 docs (one for each column) of the form { title : \"title\" col0 : value, col1 : value, col2 : value ... col300 : value } . My problem is that the \"selected\" option is not correctly set and that every time I change one value, everything is recomputed. How can I correctly initialize the table and how can I avoid the re-computation ( I've the impression that  Tracker.nonreactive is not doing what I want) ...\r\n\r\nFirst this is the common server/client code where I initialize the table. notice I want to for each column to display the drop down and adding 'selected' to the select option.\r\n\r\nto do this I create a small template, and I pass, for each column { data,  col, selected }.\r\n \r\n```coffeescript\r\nidx = 0\r\ncolumns = [ { data: \"title\" , title : \"Title\"} ]\r\nfor licence in spdxLicenseIds\r\n  col = \"lid_\" + idx++\r\n  v = do (col,licence) -> {\r\n      searchable: false\r\n      data : col\r\n      title : licence\r\n      tmpl: Meteor.isClient and Template.LicenceSwitch\r\n      tmplContext: Meteor.isClient and (rowData) -> {\r\n        data: rowData\r\n        col : col\r\n        selected: rowData[col]\r\n      }\r\n    }\r\n  columns.push v\r\n\r\nTabularTables.Books = new (Tabular.Table) (\r\n    name: 'BookList'\r\n    collection: Books\r\n    columns: columns\r\n    scrollY: 400\r\n    scrollX: true\r\n    scrollCollapse: true\r\n    fixedColumns: true\r\n    fixedHeader: true\r\n    # responsive: true\r\n    # autoWidth: false\r\n    bSort: false\r\n  )\r\n```\r\n\r\nmy template . I use the LicenceSwitch template and this to access the selected field that I setup just before : \r\n```html\r\n<template name=\"table\">\r\n  {{> tabular table=TabularTables.Books class=\"table table-striped table-bordered table-condensed\"}}\r\n</template>\r\n\r\n<template name=\"LicenceSwitch\">\r\n  <select class=\"selectopicker btn-info check-out\">\r\n    <option value=0 selected={{isSelected 0 this.selected}}>Compatible {{this.selected}}</option>\r\n    <option value=1 selected={{isSelected 1 this.selected}}>InCompatible {{this.selected}}</option>\r\n    <option value=2 selected={{isSelected 2 this.selected}}>Re-licence {{this.selected}}</option>\r\n  </select>\r\n</template>\r\n```\r\n\r\nand in the end I use two helpers : \r\n```coffeescript\r\nTemplate.LicenceSwitch.events\r\n  'change .check-out': (cell) ->\r\n    selected = cell.target.value\r\n    col = $(this)[0].col\r\n    row = $(this)[0].data\r\n    Books.update(row._id, { $set: {\"#{ col }\": selected} })\r\n    console.log \"count \" + Books.find().count()\r\n\r\nTemplate.LicenceSwitch.helpers\r\n  'isSelected' : (v,sel) ->\r\n    Tracker.nonreactive () ->\r\n      if v = sel then \"true\" else \"\"\r\n```"}}