Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

angularjs How to add row after the last row in ng2 smart table

<ng2-smart-table
  [settings]="settings"
  [source]="data"
  (createConfirm)="create($event)"
></ng2-smart-table>

  create(event: { newData: Object; source: DataSource; confirm: Deferred }) {
    event.source.append(event.newData);
    event.confirm.reject();
}


import { DataSource } from 'ng2-smart-table/lib/lib/data-source/data-source';
import { Deferred } from 'ng2-smart-table/lib/lib/helpers';


  create(event: { newData: Object; source: DataSource; confirm: Deferred }) {
    event.source.append(event.newData);
    event.confirm.resolve.skipAdd = true;
    event.confirm.resolve();
  }
Comment

PREVIOUS NEXT
Code Example
Javascript :: AngularJS SPA edit button function 
Javascript :: DeepCopy in Angularjs 
Javascript :: Automatic display keyed value in a dynamic table row using javascript, angular js and html 
Javascript :: AngularJs - Display Validation Message within Component 
Javascript :: angularjs Separate values in select containing 2 object 
Javascript :: Porting Promise.all functionality from AngularJs to VueJs 
Javascript :: How can change the display of the product images on the PDP? Spartacus 
Javascript :: how to set a condition so that between the first and second mouse clicks there was a delay not 500mls 
Javascript :: Pass JSON array to function in React as props and then count items in area 
Javascript :: how to edit data retrieval using jsp 
Javascript :: Target one specific Jquery Data Table theader for CSS styles 
Javascript :: on veiwport reveal javascript 
Javascript :: how to set the x and y axis title in plotly express bar 
Javascript :: How to access POST form fields in Express 
Javascript :: boilerplate functional component for DataGrid 
Javascript :: get range of items in list javascript react native 
Javascript :: Clear for me API jquery 
Javascript :: javascript assignment by reference or value 
Javascript :: phaser wrap group 
Javascript :: react native text input allow only numbers 
Javascript :: module imports renaming 
Javascript :: react show more component 
Javascript :: cookie in Auth header 
Javascript :: unhide is not working with radio button javascript 
Javascript :: on submit success jquery 
Javascript :: Control a progress bar for custom video player 
Javascript :: Deployment of react static page using node and express 
Javascript :: how to close bootstrap modal after save 
Javascript :: close popup after 5 seconds in jquery 
Javascript :: decode jwt token in angular 
ADD CONTENT
Topic
Content
Source link
Name
9+2 =