angular-data-table is a AngularJS directive for presenting large and complex data. It has all the features you would expect from any other table but in a light package with no external depedencies. The table was designed to be extremely flexible and light; it doesn't make any assumptions about your data or how you: filter, sort or page it.
It was engineered from its conception to handle thousands of rows without sacrificing performance. It was built for modern browsers using ES6, CSS3 and HTML5 and only supports Evergreen Browsers and Angular >= 1.4.x and < 1.6.0.
Sadly, this project is not Angular2 upgrade compatible. Fortunately, we have authored ngx-datatable which is the successor to this project. We are going to slowly be transitioning this project maintenance mode. We will continue to provide feedback to the community and accept PRs but we won't be doing any major new development.
See live demos here.
- Handle large data sets ( Virtual DOM )
- Left and Right Column Pinning
- Column Reordering
- Column Resizing
- Intelligent Column Width Algorithms ( Force fill / Flex-grow )
- Horizontal/Vertical Scrolling
- Virtual Paging WITH linked traditional pager
- Tree Grids
- Row Grouping
- Checkbox and Row Selection ( multi / single / keyboard / touch )
- Light codebase / No external deps
- Client-side AND Server Pagination / Sorting
- Rich header / column templates
- Fixed AND Fluid height
- Decoupled themeing with included Google Material theme
- Decoupled Cell tooltips on overflow
- Decoupled Column Add/Removing Menu
- Expressive Syntax
npm install angular-data-table
jspm install github:swimlane/angular-data-table
bower install angular-data-table
or Github download or clone of course!
You've got 5 different options to include this in your build depending on your setup.
./release/dataTable.js- A standalone file that was compiled with Babel (UMD)
./release/dataTable.min.js- A minified standalone file that was compiled with Babel (UMD)
./release/dataTable.cjs.js- A standalone file that was compiled with Babel (CommonJS)
./release/dataTable.es6.js- Raw ES6 Version.
All distributions include babel helpers, so they do not have to be included separately.
There is also the CSS too:
./release/dataTable.css- The base CSS, pretty much required
./release/material.css- Material theme
./release/icons.css- If you want to show fancy icons when sorting
data-table module as a dependency:
var module = angular;
Set the data and the options in your controller:
then using expressive markup in your template:
and your off to the races! See live demos here.
The data table can be created with the following
checkboxSelection: Checkbox selection vs row click (default:
columnMode: Possible values are
canAutoResize: Whether the column can automatically resize to fill space in the table (default:
function. Returns content for the
cellRenderer. If not provided, the cell data will be collected from row data instead (default:
function. Returns HTML for the cell.
className: CSS class for the body cell (default:
function. Custom sort comparator, pass
falseif you want to do server sort
flexGrow: The growth factor relative to other columns (default:
frozenLeft: Column is pinned to the left (default:
frozenRight: Column is pinned to the right (default:
group: Whether to group by the column (default:
headerCheckbox: Toggles the checkbox column in the header for selecting all values given to the grid (default:
headerClassName: CSS class for the header cell (default:
function. Returns HTML for the cell (default:
isCheckboxColumn: Adds the checkbox selection to the column (default:
isTreeColumn: Adds +/- button and makes a secondary call to load nested data (default:
maxWidth: Maximum width, in pixels (default:
minWidth: Minimum width, in pixels (default:
name: Name of the column
prop: Property to use to get the data
resizable: Whether the column can be resized (default:
sort: Default sort asecending/descending for the column (default:
sortBy: Property by which to sort (default:
sortable: Whether the column can be sorted (default:
width: Width, in pixels (default:
emptyMessage: Message to show when array is presented but contains no values (default:
'No data to display')
footerHeight: Footer height in pixels. Pass a
falseyvalue for no footer (default:
headerHeight: Header height in pixels. Pass a
falseyvalue for no header (default:
loadingMessage: Loading message presented when the array is undefined (default:
multiSelect: Whether users can select multiple items (default:
reorderable: Whether you can reorder columns (default:
rowHeight: Row height in pixels, necessary if using lazy rendering (default:
scrollbarV: Enable vertical scrollbars (default:
selectable: Whether users can select items (default:
Ensure you have the latest NPM and JSPM installed globally. If you don't already have JSPM installed run:
npm install jspm -g.
gulp watch serve
- Open your browser to
gulp release to build Modules, ES* via Babel and compile.
angular-data-table is a Swimlane open-source project; we believe in giving back to the open-source community by sharing some of the projects we build for our application. Swimlane is an automated cyber security operations and incident response platform that enables cyber security teams to leverage threat intelligence, speed up incident response and automate security operations.