daniel-nagy / md-data-table

Material Design Data Table for Angular Material
MIT License
1.9k stars 519 forks source link

Show simple message if no elements are being show. #284

Open diosney opened 8 years ago

diosney commented 8 years ago

Possible places to show it:

spirospolitis commented 8 years ago

I wanted to implement the same feature, just saying that you can easily hack around this like so:

<!-- Empty data set  -->
<md-data-table-container
  ng-show="results.length === 0">
  <table md-data-table>
    <thead>
    </thead>
    <tbody>
      <tr>
        <td class="md-title">
          No documents to show
        </td>
      </tr>
    </tbody>
  </table>
</md-data-table-container>

<!-- Non-empty data set  -->
<md-data-table-container
  ng-show="results.length > 0">
  ...
  ...