md-data-table icon indicating copy to clipboard operation
md-data-table copied to clipboard

Table Progress

Open daniel-nagy opened this issue 11 years ago • 6 comments

I think I may have broken the md-progress attribute.

daniel-nagy avatar Aug 18 '15 12:08 daniel-nagy

Table controller is watching on incorrect attribute tableCtrl where the controller is currently named $mdDataTableCtrl.

pavelhoral avatar Aug 23 '15 14:08 pavelhoral

Ah yes, I renamed the controllers in the last update. Thank you for finding this!

daniel-nagy avatar Aug 23 '15 14:08 daniel-nagy

Are you sure that it is fixed ? I cloned this code today and it seems like it's still broken

jazalizil avatar Aug 24 '15 16:08 jazalizil

@jazalizil I just did a fresh clone of the repo and verified this is working. If you click the button in the table footer that says trigger outside event you should see the progress indicator. If this is not the case, please let me know.

daniel-nagy avatar Aug 24 '15 16:08 daniel-nagy

Yes it works in this case, but not when I pass a promise as the md-progress attribute on a table.

jazalizil avatar Aug 24 '15 16:08 jazalizil

That is exactly what the button is doing if you look at the source code for the nutrition controller.

<!-- table element -->
<table md-data-table md-row-select="selected" md-progress="deferred">

<!-- button in table footer -->
<md-button ng-click="loadStuff()">Trigger Outside Event</md-button>
$scope.loadStuff = function () {
    var deferred = $q.defer();

    $timeout(function () {
      deferred.reject();
    }, 2000);

    $scope.deferred = deferred.promise;
  };

daniel-nagy avatar Aug 24 '15 16:08 daniel-nagy