Skip to content

md-data-table #224

@Gregcop1

Description

@Gregcop1

Hi.

What do you think about adding a component for Data Table? It could be pretty useful on admin app.

Features:

  • apply material design recommandations about header, row and cells
  • activation of checkbox on each row and a master checkbox to rule them all. The idea is to allow multiple selection and fired action on change
  • tooltip on header label
  • auto truncate of header label

The idea is to be as transparent as possible. Integrator don't have to learn a new way to build data table, so it could be something like this :

<md-data-table [selectable]="true" (onSelectableAll)="logEvent($event)" (onSelectableChange)="logEvent($event)">
  <thead>
  <tr>
    <th class="md-data-table-cell-non-numeric">Material</th>
    <th>Quantity</th>
    <th truncateAt="20">Unit price</th>
  </tr>
  </thead>
  <tbody>
  <tr *ngFor="#material of materials" [selectableValue]="material.id">
    <td class="md-data-table-cell-non-numeric">{{ material.name }}</td>
    <td>{{ material.quantity }}</td>
    <td>{{ material.price }}</td>
  </tr>
  </tbody>
</md-data-table>

I've already worked on the first steps for this feature in another repo (I have an idea of revamp about using more observable but it's still a WIP)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions