{"id":13445736,"url":"https://github.com/future-architect/cheetah-grid","last_synced_at":"2025-05-14T00:04:46.780Z","repository":{"id":26502098,"uuid":"109199313","full_name":"future-architect/cheetah-grid","owner":"future-architect","description":"The fastest open-source data table for web.","archived":false,"fork":false,"pushed_at":"2025-02-19T08:13:10.000Z","size":20793,"stargazers_count":1486,"open_issues_count":36,"forks_count":119,"subscribers_count":33,"default_branch":"master","last_synced_at":"2025-05-10T06:41:25.892Z","etag":null,"topics":["canvas","data-table","grid","javascript","javascript-library","spreadsheet","vue-component","vue-components"],"latest_commit_sha":null,"homepage":"https://future-architect.github.io/cheetah-grid/","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/future-architect.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"github":"ota-meshi"}},"created_at":"2017-11-02T00:37:15.000Z","updated_at":"2025-05-07T23:38:09.000Z","dependencies_parsed_at":"2023-11-08T04:07:31.605Z","dependency_job_id":"434bdaa3-219d-48a6-903e-37dc5ccb68fd","html_url":"https://github.com/future-architect/cheetah-grid","commit_stats":{"total_commits":400,"total_committers":8,"mean_commits":50.0,"dds":0.08499999999999996,"last_synced_commit":"0e00324b53b16f0b9ab8f2230cca43c4bf15c734"},"previous_names":[],"tags_count":140,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/future-architect%2Fcheetah-grid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/future-architect%2Fcheetah-grid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/future-architect%2Fcheetah-grid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/future-architect%2Fcheetah-grid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/future-architect","download_url":"https://codeload.github.com/future-architect/cheetah-grid/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254043287,"owners_count":22004916,"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":["canvas","data-table","grid","javascript","javascript-library","spreadsheet","vue-component","vue-components"],"created_at":"2024-07-31T05:00:38.607Z","updated_at":"2025-05-14T00:04:46.755Z","avatar_url":"https://github.com/future-architect.png","language":"JavaScript","funding_links":["https://github.com/sponsors/ota-meshi"],"categories":["Libraries","JavaScript","Components \u0026 Libraries","UI组件","UI Components [🔝](#readme)","UI Components","电子表格"],"sub_categories":["Spreadsheet","UI Components","表","Table","运行器e2e测试"],"readme":"# Cheetah Grid\n\n[![GitHub](https://img.shields.io/github/license/future-architect/cheetah-grid.svg)](https://github.com/future-architect/cheetah-grid)\n[![npm](https://img.shields.io/npm/v/cheetah-grid.svg)](https://www.npmjs.com/package/cheetah-grid)\n[![npm](https://img.shields.io/npm/dw/cheetah-grid.svg)](http://www.npmtrends.com/cheetah-grid)\n[![npm](https://img.shields.io/npm/dm/cheetah-grid.svg)](http://www.npmtrends.com/cheetah-grid)\n[![npm](https://img.shields.io/npm/dy/cheetah-grid.svg)](http://www.npmtrends.com/cheetah-grid)\n[![npm](https://img.shields.io/npm/dt/cheetah-grid.svg)](http://www.npmtrends.com/cheetah-grid)\n[![Build Status](https://github.com/future-architect/cheetah-grid/workflows/CI/badge.svg?branch=master)](https://github.com/future-architect/cheetah-grid/actions?query=workflow%3ACI)\n\n[![Cheetah Grid](https://future-architect.github.io/cheetah-grid/logo.svg)](https://future-architect.github.io/cheetah-grid/)\n\nThe fastest open-source data table for web.\n\n[![capture.png](https://github.com/future-architect/cheetah-grid/raw/master/images/capture.png)](https://future-architect.github.io/cheetah-grid/)\n\n[DEMO \u0026 Documents](https://future-architect.github.io/cheetah-grid/)\n\n## Downloading Cheetah Grid\n\n### Using Cheetah Grid with a CDN\n\n[![npm](https://img.shields.io/npm/v/cheetah-grid.svg)](https://www.npmjs.com/package/cheetah-grid)\n\n```html\n\u003cscript src=\"https://unpkg.com/cheetah-grid@1.16\"\u003e\u003c/script\u003e\n```\n\n### Downloading Cheetah Grid using npm\n\n[![npm](https://img.shields.io/npm/v/cheetah-grid.svg)](https://www.npmjs.com/package/cheetah-grid)\n\n```sh\nnpm install -S cheetah-grid\n```\n\n```js\nimport * as cheetahGrid from \"cheetah-grid\";\n\n// or\n\nconst cheetahGrid = require(\"cheetah-grid\");\n```\n\n### Downloading Cheetah Grid source code\n\n[![npm](https://img.shields.io/npm/v/cheetah-grid.svg)](https://www.npmjs.com/package/cheetah-grid)\n\n[cheetahGrid.es5.min.js](https://unpkg.com/cheetah-grid@1.16/dist/cheetahGrid.es5.min.js)\n\nSourceMap  \n[cheetahGrid.es5.min.js.map](https://unpkg.com/cheetah-grid@1.16/dist/cheetahGrid.es5.min.js.map)\n\n### Downloading Cheetah Grid using GitHub\n\n[![GitHub package version](https://img.shields.io/github/package-json/v/future-architect/cheetah-grid.svg)](https://github.com/future-architect/cheetah-grid)\n\n#### git clone\n\n```bash\ngit clone https://github.com/future-architect/cheetah-grid.git\n```\n\n#### npm install \u0026 build\n\n```bash\nnpm install\nnpm run build\n```\n\nbuilt file is created in the `./packages/cheetah-grid/dist` directory\n\n## Usage\n\n### Example for basic usage\n\n```html\n\u003cdiv id=\"sample\" style=\"height: 300px; border: solid 1px #ddd;\"\u003e\u003c/div\u003e\n\u003cscript\u003e\n  // initialize\n  const grid = new cheetahGrid.ListGrid({\n    // Parent element on which to place the grid\n    parentElement: document.querySelector(\"#sample\"),\n    // Header definition\n    header: [\n      {\n        field: \"check\",\n        caption: \"\",\n        width: 50,\n        columnType: \"check\",\n        action: \"check\",\n      },\n      { field: \"personid\", caption: \"ID\", width: 100 },\n      { field: \"fname\", caption: \"First Name\", width: 200 },\n      { field: \"lname\", caption: \"Last Name\", width: 200 },\n      { field: \"email\", caption: \"Email\", width: 250 },\n    ],\n    // Array data to be displayed on the grid\n    records,\n    // Column fixed position\n    frozenColCount: 2,\n  });\n\u003c/script\u003e\n```\n\nPlease refer to the [documents](https://future-architect.github.io/cheetah-grid/) for details\n\n\u003e **Using the Vue Component of Cheetah Grid**  \n\u003e Please refer to the [`vue-cheetah-grid`](https://www.npmjs.com/package/vue-cheetah-grid)\n\u003e\n\u003e **Using the React Component of Cheetah Grid**  \n\u003e Please refer to the [`react-cheetah-grid`](https://www.npmjs.com/package/react-cheetah-grid)\n\n### Definition of columns and headers\n\nThe `header` property, the property of `cheetahGrid.ListGrid`, decides the behave and appearance of columns and header cells.\nWe can set this property by constructor arguments or instance property.\n\nThe `header` property must be set by objects array (`Array\u003cobject\u003e`).\nIn the standard definition, each object consists of following properties.\n\n| Property              | Description                                                            |\n| --------------------- | ---------------------------------------------------------------------- |\n| caption               | define the header caption                                              |\n| field                 | define the field name or function of the record to display in the cell |\n| width (optional)      | define the width of column                                             |\n| columnType (optional) | define the type of column                                              |\n| style (optional)      | define the style of column                                             |\n| action (optional)     | define the action of column                                            |\n\nTo use multiple header, set the hierarchical structured Object to the `header` property.\n\n```js\nconst grid = new cheetahGrid.ListGrid({\n  //...\n  header: [\n    //...\n    {\n      /* multiple header */\n      caption: \"Name\",\n      columns: [\n        { field: \"fname\", caption: \"First Name\", width: 200 },\n        { field: \"lname\", caption: \"Last Name\", width: 200 },\n      ],\n    },\n    //...\n  ],\n  //...\n});\n```\n\n### Definition of column type\n\nSet the column type by using `columnType`.\n\nFor example, you can set the following strings:\n\n| Property          | Description                                  |\n| ----------------- | -------------------------------------------- |\n| none              | draw text in the cell                        |\n| `'number'`        | draw number in the cell with comma-separated |\n| `'check'`         | draw checkbox in the cell                    |\n| `'button'`        | draw button in the cell                      |\n| `'image'`         | draw image in the cell                       |\n| `'multilinetext'` | draw multiline text in the cell              |\n\nIf you define a class instance you can define an advanced column types.\n\nPlease refer to the [column types documents](https://future-architect.github.io/cheetah-grid/documents/api/js/column_types/Classes.html) for details\n\n### Definition of column action\n\nDefine column action by using `action` property.\n\n| `action`  | Description                   |\n| --------- | ----------------------------- |\n| `'check'` | make the check box clickable. |\n| `'input'` | make the cell enterable.      |\n\nIf you define a class instance you can define an advanced column actions.\n\nPlease refer to the [column actions documents](https://future-architect.github.io/cheetah-grid/documents/api/js/column_types/Classes.html) for details\n\n### Definition of column style\n\nDefine column style by using `style` property.\n\nProperties below are prepared in standard.\n\n| Property     | Description                                                                                      |\n| ------------ | ------------------------------------------------------------------------------------------------ |\n| color        | define the color of cell.                                                                        |\n| textAlign    | define the horizontal position of text in cell.                                                  |\n| textBaseline | define the vertical position of text in cell.                                                    |\n| bgColor      | define the background color of cell.                                                             |\n| font         | define the font of cell.                                                                         |\n| padding      | define the padding of cell. if you set 4 values separately, please set the `Array`.              |\n| textOverflow | define how to display when text overflows the area of a cell. `clip` or `ellipsis` is available. |\n\nIn addition, there is an extended style property for each column type.\n\n---\n\nPlease refer to the [documents](https://future-architect.github.io/cheetah-grid/) for details\n\n## License\n\nSee the [LICENSE](LICENSE) file for license rights and limitations (MIT).\n\n## Supporting Cheetah Grid\n\n[![sponsors](https://img.shields.io/badge/-Sponsor-fafbfc?logo=GitHub%20Sponsors)](https://github.com/sponsors/ota-meshi)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuture-architect%2Fcheetah-grid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffuture-architect%2Fcheetah-grid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuture-architect%2Fcheetah-grid/lists"}