{"id":24247113,"url":"https://github.com/manifestwebdesign/mf-grid","last_synced_at":"2025-09-23T11:31:59.346Z","repository":{"id":15883487,"uuid":"18624631","full_name":"ManifestWebDesign/mf-grid","owner":"ManifestWebDesign","description":"Simple fixed-header grid for Angular JS","archived":false,"fork":false,"pushed_at":"2017-01-10T19:36:57.000Z","size":450,"stargazers_count":3,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-10T20:47:29.148Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/ManifestWebDesign.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2014-04-10T05:02:13.000Z","updated_at":"2017-01-10T01:03:01.000Z","dependencies_parsed_at":"2022-08-04T07:00:13.341Z","dependency_job_id":null,"html_url":"https://github.com/ManifestWebDesign/mf-grid","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ManifestWebDesign%2Fmf-grid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ManifestWebDesign%2Fmf-grid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ManifestWebDesign%2Fmf-grid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ManifestWebDesign%2Fmf-grid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ManifestWebDesign","download_url":"https://codeload.github.com/ManifestWebDesign/mf-grid/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233971464,"owners_count":18759223,"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":"2025-01-14T23:18:14.074Z","updated_at":"2025-09-23T11:31:54.000Z","avatar_url":"https://github.com/ManifestWebDesign.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"#MF Grid\nA simple fixed-header grid for Angular JS. mf-grid was created as a lightweight alternative to [NG Grid](http://angular-ui.github.io/ng-grid/).\n\n\n## Installation\n```bower install angular-mf-grid```\n\nor\n\n```git clone git@github.com:ManifestWebDesign/mf-grid```\n\n## Usage\n```\n\u003c!-- mf-grid has two dependencies jQuery and AngularJS --\u003e\n\u003cscript src=\"//ajax.googleapis.com/ajax/libs/angularjs/1.2.21/angular.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js\"\u003e\u003c/script\u003e\n\n\u003c!-- dist files --\u003e\n\u003clink rel=\"stylesheet\" href=\"dist/mf-grid.min.css\" /\u003e\n\u003cscript src=\"dist/mf-grid.js\"\u003e\u003c/script\u003e\n```\n\n## Example\n\n#### Controller\n ```javascript\n\"use strict\";\nangular.module(\"app\", [\"mfGrid\"]).controller(\"MainCtrl\", [\"$scope\",\n\tfunction($scope) {\n\t\t$scope.gridOpts = {\n\t\t\tdata: 'results',\n\t\t\theaderRowHeight: 32,\n\t\t\tcolumnDefs: [\n\t\t\t\t{field: 'name', width: 110,\tdisplayName: 'Name'},\n\t\t\t\t{field: \"instrument === null ? '-' : instrument\", width: 110, displayName: 'Instrument'}\n\t\t\t]\n\t\t};\n\n\t\t$scope.results = [\n\t\t\t{name: 'John',\t\tinstrument: 'Guitar'},\n\t\t\t{name: 'Paul',\t\tinstrument: 'Bass and Guitar'},\n\t\t\t{name: 'George',\tinstrument: 'Guitar'},\n\t\t\t{name: 'Ringo',\t\tinstrument: null}\n\t\t];\n\t}]);\n```\n\n#### View\n ```html\n\u003ch2\u003eBand Members\u003c/h2\u003e\n\u003cdiv mf-grid=\"gridOpts\"\u003e\u003c/div\u003e\n```\n\n## Options\n\n\nOption |  Default Value | Definition\n------ | -------------- | ---------\nafterSelectionChange | null | Callback for when you want to validate something after selection.\ncolumnDefs | null | Definitions of columns as an array []. If not defined columns are auto-generated from data.\ndata | [] | Data being displayed in the grid. Each item in the array is mapped to a row being displayed.\nenableSorting | true | Enables or disables sorting in grid.\nheaderColumnClick | null | Trigger this function when the header column is clicked. This overrides the default sorting functionality.\nheaderRowHeight | 0 | The height of the header row in pixels.\nheaderRowTemplate | See below | Define a header row template for further customization.\nmultiSelect | true | Set this to false if you only want one item selected at a time.\nrowClick | null | Function to trigger when the row clicks. If null, there will be no hover style on the rows.\nrowHeight | 30 | Row height of rows in grid.\nrowTemplate | See below | Row template\nselectAll | See below | Function that is appended to the specific grid options for users to programmatically set the selected value all of the rows to the state passed. | Yes=ngCell {{col.cellClass}}\u003e\u003cdiv class=ngVerticalBar ng-style={height: rowHeight} ng-class={ ngVerticalBarVisible: !$last }\u003e\u0026nbsp;\u003c/div\u003e\u003cdiv ng-cell\u003e\u003c/div\u003e\u003c/div\u003e | Define a row Template to customize output.\nselectedItems | [] | All of the items selected in the grid. In single select mode there will only be one item in the array.\nselectItem | See below | Function that is appended to the specific grid options for users to programmatically select the row based on the index of the entity in the data array option.\nshowHeaderRow | true | Control the visibility of the header row.\nshowSelectionCheckbox | false | Row selection check boxes appear as the first column.\nsortColumn | null | A column object to specify initial sorting column.\nsortAsc | null | Boolean for initial sorting to be in Ascending order.\ntrackItemBy | null | Primary tracking column for row\nvirtualizationInterval | 2 | Number of rows.\nvirtualizationOverflow | 4 | Number of rows to virtualize outside of the viewport.\nvirtualizationThreshold | 50 | The threshold in rows at which to force row virtualization on.\n\n\u003c!--\nitemsBefore\nsnapping\npixelsBefore\nscrollTop\n--\u003e\n\n## Template Options and functions\n\n#### rowTemplate\n```\n\u003cdiv mf-grid-row\n\tng-repeat=\"item in grid.visibleItems track by $index\"\n\tng-class=\"rowClass\"\n\tclass=\"grid-row\"\u003e\n\t\u003cdiv ng-if=\"grid.showSelectionCheckbox\"\n\t\tclass=\"grid-column grid-checkbox-column\"\u003e\n\t\t\u003cinput ng-checked=\"isSelected\" type=\"checkbox\" /\u003e\n\t\u003c/div\u003e\n\n\t\u003cdiv mf-grid-column\n\t\tng-repeat=\"column in grid.enabledColumns\"\n\t\tclass=\"grid-column\"\u003e\n\t\u003c/div\u003e\n\u003c/div\u003e\n```\n\n#### headerRowTemplate\n```\n\u003cdiv class=\"grid-row\"\u003e'\n\t\u003cdiv ng-if=\"grid.showSelectionCheckbox\" class=\"grid-column grid-checkbox-column\"\u003e\n\t\u003cinput ng-if=\"grid.multiSelect\" ng-checked=\"grid.allItemsSelected\" title=\"Select All\" type=\"checkbox\" class=\"check-all\" /\u003e\n\n\t\u003cdiv ng-repeat=\"column in grid.enabledColumns\"\n\t\tng-style=\"{ width: column.width }\"\n\t\tng-class=\"{ \\'grid-column-sortable\\': grid.enableSorting }\"\n\t\tng-click=\"headerColumnClick(column, $index)\"\n\t\tclass=\"grid-column {{ column.headerClass }}\"\u003e\n\t\t{{ column.displayName }}\n\n\t\t\u003cdiv ng-show=\"grid.enableSorting \u0026\u0026 grid.sortColumn \u0026\u0026 grid.sortColumn.field === column.field\"\n\t\t\tclass=\"grid-sort-icon glyphicon glyphicon-chevron-{{ grid.sortAsc ? \\'up\\' : \\'down\\' }} icon-chevron-{{ grid.sortAsc ? \\'up\\' : \\'down\\' }}\"\u003e\n\t\t\u003c/div\u003e\n\t\u003c/div\u003e\n\u003c/div\u003e\n```\n\n#### selectAll\n```\nfunction(selected) {\n\tif (!selected) {\n\t\tthis.allItemsSelected = false;\n\t\tthis.selectedItems.length = 0;\n\t\treturn;\n\t}\n\tfor (var i = 0, l = this._data.length; i \u003c l; ++i) {\n\t\tthis.selectedItems.push(this._data[i]);\n\t}\n\tthis.allItemsSelected = true;\n}\n```\n\n#### selectItem\n```\nfunction(item, selected) {\n\tif (this.multiSelect === false) {\n\t\tthis.selectedItems.length = 0;\n\t\tthis.selectedItems.push(item);\n\t\tthis.updateCheckAll();\n\t\treturn;\n\t}\n\n\tvar index = this.selectedItems.indexOf(item),\n\t\tisSelected = index !== -1;\n\n\tif ((selected \u0026\u0026 isSelected) || (!selected \u0026\u0026 !isSelected)) {\n\t\treturn;\n\t}\n\tif (selected) {\n\t\tthis.selectedItems.push(item);\n\t} else {\n\t\tthis.selectedItems.remove(index);\n\t}\n\tthis.updateCheckAll();\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanifestwebdesign%2Fmf-grid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanifestwebdesign%2Fmf-grid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanifestwebdesign%2Fmf-grid/lists"}