2.0.0 • Published 6 years ago

angular-inline-editable-table v2.0.0

Weekly downloads
124
License
-
Repository
-
Last release
6 years ago

Inline Editable Data Table Module

Angular4 Inline Editable Data Table: A reusable module which can be consumed like any other Angular modules.

Git repo

https://github.com/RatneshChauhan/springboot-angular-crud

How to get it

You can get inline editable data table via npm by running the following command to add it as a new dependency to your package.json file and import it in your module

import { EditableTableModule } from 'angular-inline-editable-table'

@NgModule( { imports: EditableTableModule } )

Prerequisites

  • BrowserAnimationsModule in your app module (Generally, 'app.module.ts')

Usage

  • Add this in your component's template file wherein you want to display it
<div *ngIf="dataLoaded">
<app-editable-table 
  [columns]="['id','firstName','lastName','createdAt','updatedAt', 'Actions']"
  [editableColumns] = "['lastName', 'createdAt', 'firstName']"
  [dateColumns] ="['createdAt','updatedAt']"
  [data]="tableData" 
  [pageSizeOptions]="[5,6,9,12,20,50,100]" 
  [searchable]="true" 
  (action)="action($event)"
  [notification]="yourMessage"
  [maxChar]="23">
</app-editable-table>
</div>
  • Description
  • Sample data
  • Add this in your component's typescript file
  1. Add variables to be passed to the table
  1. Assign data to table and set dataLoaded to true
  1. Add call back function

Add Styling

  1. Create a file called theming.scss in src and add the following content in it (feel free to modify per your requirements)
  1. Open your application's angular.json and add this theming.scss file in it after style.css

Complete source code and working example is here

https://github.com/RatneshChauhan/springboot-angular-crud

Author

Ratnesh Chauhan, Full Stack Developer

License

The MIT License (MIT)

Copyright (c) 2018 Ratnesh Chauhan

Permission is hereby granted, free of charge, to any person obtaining a copy of this application and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so.