mdDataTable icon indicating copy to clipboard operation
mdDataTable copied to clipboard

how to put ng-click or a href to the mddatatable

Open gerome0123 opened this issue 8 years ago • 8 comments

i have a code like this

mdt-table sortable-columns="true" animate-sort-icon="true" ripple-effect="true" table-card="{title: ctrl.data[ ctrl.selected_index ].label, actionIcons: true}" mdt-row="{'data': filteredItems,'table-row-id-key': 'key','column-keys': ['first_name', 'last_name', 'branch.name', 'department.name', 'email', 'employment_status.kind']}"

mdt-header-row mdt-column align-rule="center" First Name mdt-column align-rule="center" Last Name mdt-column align-rule="center" Branch Name mdt-column align-rule="center" Department Name mdt-column align-rule="center" Email mdt-column align-rule="center" Status

where can i put some ng-click or a href to get the id and redirect that person in to another view thanks

gerome0123 avatar Oct 24 '16 09:10 gerome0123

Look at these example: http://codepen.io/iamisti/pen/pbLYwq

Or mine:

<mdt-custom-cell column-key="id"> <i class="material-icons" title="Ver" ng-click="clientScope.showView($event, rowId)">search</i> <i class="material-icons" title="Editar" ng-click="clientScope.showEdit($event, rowId)">create</i> <i class="material-icons" title="Eliminar" ng-click="clientScope.showDelete($event, rowId)">delete</i> </mdt-custom-cell>

orekav avatar Oct 25 '16 15:10 orekav

Did the above example help?

iamisti avatar Oct 26 '16 06:10 iamisti

is there possible to click the one whole row????

gerome0123 avatar Oct 27 '16 01:10 gerome0123

hmm interesting, no there is no callback for that, but if you need it we can put that in. There were no need for that yet.

iamisti avatar Oct 27 '16 06:10 iamisti

Any reason why you closed the ticket?

iamisti avatar Oct 28 '16 11:10 iamisti

#201

laurentperroteau avatar Jan 03 '17 11:01 laurentperroteau

I added the feature here : https://github.com/rvt/mdDataTable/commit/627bb8b5449cadb600836481fa7d2327060d8aac

iamisti, let me know if this is complete and for your style of programming. I also updated readme.

rvt avatar Feb 16 '17 20:02 rvt

<md-row *cdkRowDef="let row; columns: displayedColumns;" (click)="showit(row)"></md-row>

dmostroff avatar Sep 04 '17 21:09 dmostroff