{"id":13480761,"url":"https://github.com/valor-software/ng2-table","last_synced_at":"2025-05-15T17:06:05.988Z","repository":{"id":57102406,"uuid":"41477999","full_name":"valor-software/ng2-table","owner":"valor-software","description":"Simple table extension with sorting, filtering, paging... for Angular2 apps","archived":false,"fork":false,"pushed_at":"2022-10-26T15:57:10.000Z","size":16581,"stargazers_count":552,"open_issues_count":320,"forks_count":335,"subscribers_count":39,"default_branch":"development","last_synced_at":"2025-05-04T16:02:15.275Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://valor-software.github.io/ng2-table/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/valor-software.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-27T09:31:44.000Z","updated_at":"2025-03-28T07:24:24.000Z","dependencies_parsed_at":"2023-01-20T13:01:25.128Z","dependency_job_id":null,"html_url":"https://github.com/valor-software/ng2-table","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valor-software%2Fng2-table","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valor-software%2Fng2-table/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valor-software%2Fng2-table/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valor-software%2Fng2-table/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valor-software","download_url":"https://codeload.github.com/valor-software/ng2-table/tar.gz/refs/heads/development","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254355334,"owners_count":22057354,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T17:00:44.713Z","updated_at":"2025-05-15T17:06:00.979Z","avatar_url":"https://github.com/valor-software.png","language":"TypeScript","readme":"# ng2-table [![npm version](https://badge.fury.io/js/ng2-table.svg)](http://badge.fury.io/js/ng2-table)\nSimple table extension with sorting, filtering, paging... for Angular2 apps\n\nFollow me [![twitter](https://img.shields.io/twitter/follow/valorkin.svg?style=social\u0026label=%20valorkin)](https://twitter.com/valorkin) to be notified about new releases.\n\n[![Angular 2 Style Guide](https://mgechev.github.io/angular2-style-guide/images/badge.svg)](https://github.com/mgechev/angular2-style-guide)\n[![Build Status](https://travis-ci.org/valor-software/ng2-table.svg?branch=master)](https://travis-ci.org/valor-software/ng2-table)\n[![Code Climate](https://codeclimate.com/github/valor-software/ng2-table/badges/gpa.svg)](https://codeclimate.com/github/valor-software/ng2-table)\n[![Join the chat at https://gitter.im/valor-software/ng2-bootstrap](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/valor-software/ng2-bootstrap?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n[![Dependency Status](https://david-dm.org/valor-software/ng2-table.svg)](https://david-dm.org/valor-software/ng2-table)\n[![devDependency Status](https://david-dm.org/valor-software/ng2-table/dev-status.svg)](https://david-dm.org/valor-software/ng2-table#info=devDependencies)\n[![Throughput Graph](https://graphs.waffle.io/valor-software/ng2-table/throughput.svg)](https://waffle.io/valor-software/ng2-table/metrics)\n\n# Usage \u0026 Demo\n[http://valor-software.github.io/ng2-table/](http://valor-software.github.io/ng2-table/)\n\n\n- - -\n\n## Installation\n\n1. A recommended way to install ***ng2-table*** is through [npm](https://www.npmjs.com/search?q=ng2-table) package manager using the following command:\n\n  ```bash\n  npm i ng2-table --save\n  ```\n\n  Alternatively, you can [download it in a ZIP file](https://github.com/valor-software/ng2-table/archive/master.zip).\n\n2. More information regarding using of ***ng2-table*** is located in\n  [demo](http://valor-software.github.io/ng2-table/) and [demo sources](https://github.com/valor-software/ng2-table/tree/master/demo).\n\n## Documentation\n\n### Inputs (Properties)\n\n- `page` (`number`) - the default page after the table component loading\n- `itemsPerPage` (`number`) - number of the displaying items (rows) on a page\n- `maxSize` (`number`) - number of the displaying pages before `...`\n- `numPages` (`number`) - total number of the pages\n- `length` (`number`) - total number of the items after filtering (of it's chosen)\n\n- `config` (`?any`) - config for setup all plugins (filtering, sorting, paging):\n  - `paging` (`?boolean`) - - switch on the paging plugin\n  - `sorting` (`?any`) - switch on the sorting plugin\n    - `columns` (`Array\u003cany\u003e`) - only list of the columns for sorting\n  - `filtering` (`?any`) - switch on the filtering plugin\n    - `filterString` (`string`) - the default value for filter\n    - `columnName` (`string`) - the property name in raw data\n  - `className` (`string|Array\u003cstring\u003e`) - additional CSS classes that should be added to a \u003ctable\u003e\n\n- `rows` (`?Array\u003cany\u003e`) - only list of the rows which should be displayed\n- `columns` (`?Array\u003cany\u003e`) - config for columns (+ sorting settings if it's needed)\n    - `title` (`string`) - the title of column header\n    - `name` (`string`) - the property name in data\n    - `sort` (`?string|boolean`) - config for columns (+ sorting settings if it's needed), sorting is switched on by default for each column\n    - `className` (`string|Array\u003cstring\u003e`) - additional CSS classes that should be added to a column header\n    - `filtering` (`?any`) - switch on the filtering plugin\n      - `filterString` (`string`) - the default value for filter\n      - `columnName` (`string`) - the property name in raw data\n\n### Outputs (Events)\n\n- `tableChanged`: data change event handler\n- `cellClicked`: onclick event handler\n\n### Filter\n\nThe responsibility of the filtering issue falls on user. You should choose on which columns the filter would be applied. You could add any number of different filters.\nFilter string - it's a string for matching values in raw data. Column name refers to the property name in raw data. The rest logic you could organize by yourself (the order of filters, data formats, etc). Even you could use filter for list of data columns.\n\nYou can also set up `filtering` param for columns, in this case filter box will appear in first row of the table.\n\n### Sorting\n\nData sorting could be in 3 modes: asc, desc and without sorting data (as it comes from backend or somewhere else). If you want to switch off the sorting for some of the columns then you should set it forcibly in columns config (set property sort to false value for each column you want)\n\n### Paging\n\nPagination could be used from [ng2-bootstrap](https://github.com/valor-software/ng2-bootstrap) - [pagination component](http://valor-software.github.io/ng2-bootstrap/#pagination). When the page is changed, the pagination component will emit event `change-table` with an object {page, itemsPerPage}. Then you can easily subscribe on it and request corresponding raw data.\n\n\n## Troubleshooting\n\nPlease follow this guidelines when reporting bugs and feature requests:\n\n1. Use [GitHub Issues](https://github.com/valor-software/ng2-table/issues) board to report bugs and feature requests (not our email address)\n2. Please **always** write steps to reproduce the error. That way we can focus on fixing the bug, not scratching our heads trying to reproduce it.\n\nThanks for understanding!\n\n### License\n\nThe MIT License (see the [LICENSE](https://github.com/valor-software/ng2-table/blob/master/LICENSE) file for the full text)\n","funding_links":[],"categories":["Uncategorized","UI","Components","Complete projects","Awesome Angular [![Awesome TipeIO](https://img.shields.io/badge/Awesome%20Angular-@TipeIO-6C6AE7.svg)](https://github.com/gdi2290/awesome-angular) [![Awesome devarchy.com](https://img.shields.io/badge/Awesome%20Angular-@devarchy.com-86BDC1.svg)](https://github.com/brillout/awesome-angular-components)","UI Components"],"sub_categories":["Uncategorized","Lists/Table","Angular \u003ca id=\"angular\"\u003e\u003c/a\u003e","Table"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalor-software%2Fng2-table","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvalor-software%2Fng2-table","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalor-software%2Fng2-table/lists"}