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.

(edit) and (editConfirm) not emitting.

See original GitHub issue

I’m not able to emit the (edit) event and (editConfirm) event with the code below.

./user-table.component.html

  <ng2-smart-table 
    [settings]="settings"
    [source]="data"
    (edit)="onFoo($event, 'edit')"
    (editConfirm)="onFoo($event, 'editConfirm')"></ng2-smart-table>

UserTableComponent

import { Component } from '@angular/core';

import { User } from 'app/user/user.model';

@Component({
  selector: 'app-user-table',
  templateUrl: './user-table.component.html',
})
export class UserTableComponent {
  settings = {
    columns: {
      firstname: {
        title: 'First Name',
      },
      lastname: {
        title: 'Last Name',
      },
    },
  };
  data: User[];

  constructor() {
    this.data = [
        new User('Chris', 'Jeffery'),
        new User('Chris', 'Jeffery'),
        new User('Chris', 'Jeffery'),
        new User('Chris', 'Jeffery'),
        new User('Chris', 'Jeffery'),
        new User('Chris', 'Jeffery'),
      ];
  }

  onFoo(event, eventName: string): void {
    debugger;
    console.log(eventName, event);
  }
}

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:6

github_iconTop GitHub Comments

4reactions
scarauxcommented, Jan 10, 2019

Works for me after writing :

 settings = {
    mode: 'inline',
    edit: {
      confirmSave: true
    }
}
0reactions
unruledboycommented, Oct 22, 2019

@scaraux

I tried with your code but the edit event is still not emitting.

Looks like I have to a dedicated new popup/page for the editing, which means inline editing is not usable.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to get edited data of smart table in angular 4
I want to get the edited data of the table but I am not getting it. The properties in ng-smart-table are as given...
Read more >
How to have edit + confirm on the same button for ... - Reddit
It seems confirm edit is locked to circle not “change mode” for the moment, I assume reset edit works the same way.
Read more >
Best Fortnite EDIT/CONFIRM Button for Controller (Non claw)
Use Support-a-Creator Code: LongJohns Subscribe for more: https://www.youtube.com/c/LongJohns Fortnite Battle Royale Playlist: ...
Read more >
Edit Confirm — Revision Service - Proof Reading
Your Edit Confirm document may have no more or no less than a 20% difference in word count from the edited version of...
Read more >
Editing Team's Best Practices
Audience is not an amorphous mass [Presentation at Editors Canada Conference]. ... Purpose and scope of edit: Confirm with Curriculum Services; consider any ......
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