{"id":16431256,"url":"https://github.com/rubencodeforges/mat-data-table","last_synced_at":"2026-03-01T08:32:52.433Z","repository":{"id":84352920,"uuid":"156351062","full_name":"rubenCodeforges/mat-data-table","owner":"rubenCodeforges","description":"mat-data-table","archived":false,"fork":false,"pushed_at":"2020-02-11T10:12:09.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-25T09:47:21.106Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rubenCodeforges.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-06T08:28:58.000Z","updated_at":"2021-03-01T09:26:06.000Z","dependencies_parsed_at":"2023-03-02T01:45:43.556Z","dependency_job_id":null,"html_url":"https://github.com/rubenCodeforges/mat-data-table","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rubenCodeforges/mat-data-table","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubenCodeforges%2Fmat-data-table","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubenCodeforges%2Fmat-data-table/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubenCodeforges%2Fmat-data-table/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubenCodeforges%2Fmat-data-table/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rubenCodeforges","download_url":"https://codeload.github.com/rubenCodeforges/mat-data-table/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubenCodeforges%2Fmat-data-table/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29965402,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T06:55:38.174Z","status":"ssl_error","status_checked_at":"2026-03-01T06:53:04.810Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-10-11T08:29:34.078Z","updated_at":"2026-03-01T08:32:52.415Z","avatar_url":"https://github.com/rubenCodeforges.png","language":"HTML","readme":"#### DataTable, ListTable Modules\n\nBothModules are part of the `AdminTableModule`.\nIt is possible to import per module all it once.\n\n#### Usage: \n\n```html\n\u003capp-admin-table \n    [dataSet]=\"exampleData\" \n    [displayedColumns]=\"displayedColumns\"\u003e\n\u003c/app-admin-table\u003e\n\n\u003capp-admin-list-table \n    [dataSet]=\"exampleData\" \n    [displayedColumns]=\"displayedColumns\"\u003e\n\u003c/app-admin-list-table\u003e\n\n```\n\n#### API: \n\nDataTableComponent Inputs: \n\n```typescript\n\n    @Input() searchTerm = '';\n    @Input() filter: { key: string, value: any };\n    @Input() dataSet: any[];\n    @Input() displayedColumns: GeneralTableColumn[] = [];\n    @Input() settings = {\n        pageIndexSubtractor: 1,\n        pagination: false,\n        checkBoxColumn: false,\n        hasAddButton: false,\n        actionMenu: true\n    };\n```\n\n`searchTerm` - used for filtering by search term\n`filter` - used for filtering by key value pair\n`dataSet` - the collection to render\n`displayedColumns` - The column configuration array, see [General Table Column](#gerneral-table-column) for description\n`settings` - the table configuration\n - `pageIndexSubtractor` - used for pagination default 1\n - `pagination` - enables pagination, (disabled in current project)\n - `checkBoxColumn` - enables a checkbox column, if true will show additional column in the rendered table.\n - `hasAddButton` - enables a add button on the rendered table\n - `actionMenu` - enables a action menu , will render new column for each row with action menu see [Action Menu](#action-menu)\n \nDataTableComponent Outputs: \n\n```typescript\n    @Output() pageChange: EventEmitter\u003cPageEvent\u003e = new EventEmitter\u003cPageEvent\u003e();\n    @Output() rowSelected: EventEmitter\u003cany\u003e = new EventEmitter\u003cany\u003e();\n```\n\nPageChange: event fired on a page change\nRowSelected: when a row was selected\n\n##### Action menu\n\nIn order to use the actionMenu enable the settings `actionMenu (default: true)`  and provide a template for the menu:\n\n```html\n \u003capp-admin-list-table [dataSet]=\"dataSet\" [displayedColumns]=\"displayedColumns\"\u003e\n    \u003cng-template let-element\u003e\n        \u003cbutton mat-icon-button [matMenuTriggerFor]=\"menu\"\u003e\n            \u003cmat-icon\u003emore_vert\u003c/mat-icon\u003e\n        \u003c/button\u003e\n        \u003cmat-menu #menu=\"matMenu\"\u003e\n            \u003cbutton mat-menu-item (click)=\"doSomething(element)\"\u003e\n                \u003cmat-icon\u003eedit\u003c/mat-icon\u003e\n                \u003cspan\u003eEdit\u003c/span\u003e\n            \u003c/button\u003e\n            \u003cbutton mat-menu-item disabled\u003e\n                \u003cmat-icon\u003evoicemail\u003c/mat-icon\u003e\n                \u003cspan\u003eCheck voicemail\u003c/span\u003e\n            \u003c/button\u003e\n            \u003cbutton mat-menu-item\u003e\n                \u003cmat-icon\u003enotifications_off\u003c/mat-icon\u003e\n                \u003cspan\u003eDisable alerts\u003c/span\u003e\n            \u003c/button\u003e\n        \u003c/mat-menu\u003e\n    \u003c/ng-template\u003e\n\u003c/app-admin-list-table\u003e\n\n```\nPlease note that the menu template should be wrapped in `\u003cng-template\u003e`\nThe `let-element` in the `ng-template` gets a reference to the element of your array.\n\nListTableComponent Inputs: \n\nListTableComponent extends the DataTableComponent so it will have same inputs and outputs.\nThere are but listTable specific ones. \n\nInput:\n\n```typescript\n    @Input() hasScroll: boolean;\n    @Input() columnSuffixTemplate: TemplateRef\u003cany\u003e;\n    @Input() columnPrefixTemplate: TemplateRef\u003cany\u003e;\n    @Input() isSticky = false;\n```\n\n- `hasSroll` - determines if table has a scroll or not\n- `columnSuffixTemplate` - you can provide a template as a column suffix. See [Template suffix prefix](#template-suffix-prefix)\n- `columnSuffixTemplate` - you can provide a template as a column prefix. See [Template suffix prefix](#template-suffix-prefix)\n- `isSticky` - enables sticky table header ( default : false )\n\nOutput:\n\n```typescript\n    @Output() addClick = new EventEmitter();\n```\n\n- triggers on add button click\n\n\n#### General Table Column\n\n```typescript\nexport interface GeneralTableColumn {\n    columnName: string;\n    columnKey: string;\n    isDate?: boolean;\n    dateFormat?: string;\n    timezone?: string;\n    isImage?: boolean;\n    isEditable?: boolean;\n    showSize?: boolean;\n    findBy?: {predicate: (element: any) =\u003e boolean, path: string };\n    arrayKey?: string | string[];\n    arrayValueSeparator?: string;\n    newlineArrayItems?: boolean;\n    truncateSize?: number;\n    sortingDisabled?: boolean;\n    isInvisible?: boolean;\n    icon?: string;\n    iconAction?: (element: any) =\u003e any;\n    iconGetClass?: (element: any) =\u003e any;\n    valuePrefix?: string;\n    valuePrefixNoValue?: string;\n    isAvatar?: boolean;\n    columnClass?: string;\n    link?: {\n        href: string;\n        labelKey?: string;\n        hrefKey?: string;\n    };\n    options?: any[];\n}\n\n```\n\nThe General Table Column is configuration item for each column\n\n- `columnName` - The displayed name of the column\n- `columnKey` - the path or array of paths of the collection object the value of which will be rendered, Supports leveled path `(myProperty.someKey)`\n- `columnKeySeparator`  - if columnKey is array can be used as separator for the joined values;\n- `isDate` - if the value is a date , this flag will apply a pipe to render a date\n- `dateFormat` - customize date format , defaults to `short`, see formating here https://angular.io/api/common/DatePipe#pre-defined-format-options \n- `timezone` - timezone see info here https://angular.io/api/common/DatePipe#pre-defined-format-options \n- `isImage` - if the value is a image , this flag will render a image\n- `isEditable` - apply a input field to the value , allows to edit it\n- `showSize` - if is an array this flag will render its size\n- `showSize` - if is an array this flag will render its size\n- `arrayKey` - if is a array of objects will render its value selected by key or keys array\n- `arrayValueSeparator` - if provided will be used to join the arrayKeys values using it\n- `findBy` - If is an array will find a element by given `predicate` and select a value by `path` \n- `isInvisible` - not visible \n- `icon, iconAction, iconGetClass` - if a icon should be show , call back action if icon is clicked, conditional css class\n- `valuePrefix, valuePrefixNoValue` - sets a prefix value for column , sets a prefix value if column value is empty\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubencodeforges%2Fmat-data-table","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubencodeforges%2Fmat-data-table","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubencodeforges%2Fmat-data-table/lists"}