title: How can I change data in ngTable without calling getData?
body: <p>I need to change data on-the-fly with an <code>ngTable</code> without asking the data to the service API.</p>
  
  <p>Suppose I have this call when I route in the controller:</p>
  
  <pre><code>vm.tableParams = new NgTableParams({
      count: 5
  }, {
      counts: counts,
      sorting: {
          name: 'asc'
      },
      getData: function(params) {
          return ApiService.query({
              limit: params.count(),
              offset: (params.page() - 1) * params.count(),
              sort: params.orderBy()
          }).$promise.then(function(response) {
              params.total(response.totals);
              return response.items;
          });
      }
  });
  </code></pre>
  
  <p>With this <code>ngTable</code> creates the table perfectly with right pagination and everything works fine, I can navigate pages, change pagesize, sorting, ecc..</p>
  
  <p><strong>Now suppose I have a broadcast message arriving each 5 seconds giving me an object with the data for a row in the table, and I want to change that row <em>and only that</em> with the new data.</strong></p>
  
  <p>If I do what you see below <code>ngTable</code> calls <code>getData()</code> and the entire rows table refresh.</p>
  
  <p>That seems to me illogic because if I pass the data via <code>dataset</code> you shouldn't call <code>getData</code> again, don't you think?</p>
  
  <p>Or am I missing something?</p>
  
  <pre><code>$scope.$on('broacastMessage', function(event, data) {
      vm.update = false;
      if (vm.tableParams &amp;&amp; vm.tableParams.data) {
          // Check if the new data is in the rows table and remap it
          var newdata = _.map(vm.tableParams.data, function(item) {
              if (data._id &amp;&amp; data._id === item._id) {
                  item = data;
                  vm.update = true;
              }
              return item;
          });
  
          // Assign new data to the table
          if (vm.update) {
              // Here this method calls getData()
              vm.tableParams.settings({
                  dataset: newdata
              });
          }
      }
  });
  </code></pre>
  
  <p>Or can I pass the new row in another way?</p>