question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Icons for action on rows

See original GitHub issue

I’m submitting a … (check one with “x”)

[ ] bug report => search github for a similar issue or PR before submitting
[*] feature request
[ ] support request => Please do not submit support request here

Current behavior

It would be nice to have action buttons(e.g edit/delete). I am not sure if there is already a way to do this. Expected behavior

We should be able configure action icons on rows, which should just emit an event with the row when the icon is clicked. We might be able to do this with templates, but not sure if we can get a reference to the row from a template.

Reproduction of the problem

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

  • Table version: 0.7.x
  • Angular version: 2.0.x
  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
  • Language: [all | TypeScript X.X | ES6/7 | ES5]

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

8reactions
CanKattwinkelcommented, Jan 19, 2017

@amcdnl is it possible to use a custom template for a single cell only? Because i dont want to create a column template for each col if I only want to add an “options” column with 3 icons.

5reactions
bc3commented, Mar 9, 2017

hey, here is a snippet on how to get what you want

 <ngx-datatable-column name="id" >
    <template let-column="column" ngx-datatable-header-template>
        actions
    </template>
    <template let-row="row" let-value="value" ngx-datatable-cell-template>
        <i class="pb-icon icon-edit" (click)="detail(row)"></i>
        <i *ngIf="row.canDelete == true" class="pb-icon icon-garbage" (click)="delete(row)"></i>
        <i *ngIf="row.canSend== true" class="pb-icon icon-send" (click)="send(row)"></i>
    </template>
</ngx-datatable-column>

and events in your component:

    detail(row: any) {
        this.router.navigateByUrl('/details/' + row.id);
    }

    delete(row: any) {
       
    }

    send(row: any) {
        
    }

Hopefully this will give you some more info

Read more comments on GitHub >

github_iconTop Results From Across the Web

Row column Icons & Symbols - Flaticon
189 row column icons. Vector icons in SVG, PSD, PNG, EPS and ICON FONT.
Read more >
Table rows Solid Icon | Font Awesome
Table rows icon in the Solid style. Make a bold statement in small sizes. Available now in Font Awesome 6.
Read more >
add icons in actions columns and in each row - vue.js
And there is a column called Action, and within this column I want to put two icons, the first is delete and the...
Read more >
About Action Icons
Action icons are generally available on pages that contain lists of data. Depending on your LearnCenter settings, these icons will either be visible...
Read more >
Actions (icons) in table - buttons - UX Stack Exchange
I like the concept of the hamburger menu since you have quite a few options available, but I would change the icon though...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found