• Stars
    star
    1,427
  • Rank 32,971 (Top 0.7 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 7 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The fastest open-source data table for web.

Cheetah Grid

GitHub npm npm npm npm npm Build Status

Cheetah Grid

The fastest open-source data table for web.

capture.png

DEMO & Documents

Downloading Cheetah Grid

Using Cheetah Grid with a CDN

npm

<script src="https://unpkg.com/[email protected]"></script>

Downloading Cheetah Grid using npm

npm

npm install -S cheetah-grid
import * as cheetahGrid from "cheetah-grid";

// or

const cheetahGrid = require("cheetah-grid");

Downloading Cheetah Grid source code

npm

cheetahGrid.es5.min.js

SourceMap
cheetahGrid.es5.min.js.map

Downloading Cheetah Grid using GitHub

GitHub package version

git clone

git clone https://github.com/future-architect/cheetah-grid.git

npm install & build

npm install
npm run build

built file is created in the ./packages/cheetah-grid/dist directory

Usage

Example for basic usage

<div id="sample" style="height: 300px; border: solid 1px #ddd;"></div>
<script>
  // initialize
  const grid = new cheetahGrid.ListGrid({
    // Parent element on which to place the grid
    parentElement: document.querySelector("#sample"),
    // Header definition
    header: [
      {
        field: "check",
        caption: "",
        width: 50,
        columnType: "check",
        action: "check",
      },
      { field: "personid", caption: "ID", width: 100 },
      { field: "fname", caption: "First Name", width: 200 },
      { field: "lname", caption: "Last Name", width: 200 },
      { field: "email", caption: "Email", width: 250 },
    ],
    // Array data to be displayed on the grid
    records,
    // Column fixed position
    frozenColCount: 2,
  });
</script>

Please refer to the documents for details

Using the Vue Component of Cheetah Grid
Please refer to the vue-cheetah-grid

Using the React Component of Cheetah Grid
Please refer to the react-cheetah-grid

Definition of columns and headers

The header property, the property of cheetahGrid.ListGrid, decides the behave and appearance of columns and header cells. We can set this property by constructor arguments or instance property.

The header property must be set by objects array (Array<object>). In the standard definition, each object consists of following properties.

Property Description
caption define the header caption
field define the field name or function of the record to display in the cell
width (optional) define the width of column
columnType (optional) define the type of column
style (optional) define the style of column
action (optional) define the action of column

To use multiple header, set the hierarchical structured Object to the header property.

const grid = new cheetahGrid.ListGrid({
  //...
  header: [
    //...
    {
      /* multiple header */
      caption: "Name",
      columns: [
        { field: "fname", caption: "First Name", width: 200 },
        { field: "lname", caption: "Last Name", width: 200 },
      ],
    },
    //...
  ],
  //...
});

Definition of column type

Set the column type by using columnType.

For example, you can set the following strings:

Property Description
none draw text in the cell
'number' draw number in the cell with comma-separated
'check' draw checkbox in the cell
'button' draw button in the cell
'image' draw image in the cell
'multilinetext' draw multiline text in the cell

If you define a class instance you can define an advanced column types.

Please refer to the column types documents for details

Definition of column action

Define column action by using action property.

action Description
'check' make the check box clickable.
'input' make the cell enterable.

If you define a class instance you can define an advanced column actions.

Please refer to the column actions documents for details

Definition of column style

Define column style by using style property.

Properties below are prepared in standard.

Property Description
color define the color of cell.
textAlign define the horizontal position of text in cell.
textBaseline define the vertical position of text in cell.
bgColor define the background color of cell.
font define the font of cell.
padding define the padding of cell. if you set 4 values separately, please set the Array.
textOverflow define how to display when text overflows the area of a cell. clip or ellipsis is available.

In addition, there is an extended style property for each column type.


Please refer to the documents for details

License

See the LICENSE file for license rights and limitations (MIT).

Supporting Cheetah Grid

sponsors

More Repositories

1

vuls

Agent-less vulnerability scanner for Linux, FreeBSD, Container, WordPress, Programming language libraries, Network devices
Go
10,885
star
2

typescript-guide

ゼロから学ぶTypeScriptガイド
Python
472
star
3

tftarget

🎯tftarget is a CLI tool for Terraform ( plan | apply | destroy ) with target option. You can interactivity select resource to ( plan | apply | destroy ) with target option.
Go
237
star
4

icons

Open Source Icons designed by Future Architect.
136
star
5

eslint-plugin-vue-scoped-css

ESLint plugin for Scoped CSS in Vue.js
TypeScript
97
star
6

coding-standards

A coding standards for enterprise system
JavaScript
87
star
7

uroborosql

Developer-oriented and SQL centric database access library
Java
85
star
8

puml-themes

PlantUML thema
59
star
9

go-mcprotocol

MC Protocol(MELSEC Communication Protocol) client implementation for golang
Go
41
star
10

uroboroSQL-formatter

Beautiful SQL Formatter
Python
39
star
11

uroborosql-fmt

Rust
35
star
12

urushi

Web Component framework.
JavaScript
34
star
13

watertower

serverless search engine
Go
32
star
14

gcp-instance-scheduler

Tools that shutdown GCP Instance on your schedule.
Go
31
star
15

awsmfa

replaces the credentials for MFA in AWS
Go
30
star
16

tech-blog

tech blog
Stylus
24
star
17

Sublime-uroboroSQL-formatter

Beautiful SQL Formatter for Sublime Text 3
Python
24
star
18

future-wru

Identity Aware Proxy
Go
20
star
19

future-architect.github.io

Stylus
18
star
20

idea-uroborosql-formatter

Beautiful SQL Formatter for IntelliJ Platform
Java
17
star
21

redmine_slack_integration

The redmine plugin for the integration of slack and redmine
Ruby
16
star
22

gbilling2slack

Slack notifications tools for Google Cloud Platform Billing.
Go
16
star
23

redmine_gitlab_adapter

'This is a Gitlab Adapter plugin for Redmine'
Ruby
15
star
24

docradle

Helper tool for Docker container
Go
12
star
25

go-twowaysql

2-Way-SQL Go implementation
Go
12
star
26

futureot

OpenCensus (OpenTelemetry) helper functions
Go
11
star
27

gbilling-plot

Create graphed invoice for Google Cloud Platform. You can see billing amount per GCP project.
Go
11
star
28

code-diaper

CodeDiaper is a tool for detecting code leaks.
Go
8
star
29

redmine_hangouts_chat_integration

The redmine plugin for the integration of google hangouts chat and redmine
Ruby
8
star
30

vscode-uroborosql-fmt

uroboroSQL-fmt for VSCode
TypeScript
6
star
31

eclipse-uroborosql-formatter

Beautiful SQL Formatter for Eclipse
Java
5
star
32

giglocal

giglocal is GCP emulator docker image for developping local testing.
Go
5
star
33

reguerr

reguerr - Code generator for systematic error handling
Go
4
star
34

LoadRunnerSamples

Sample scripts for HPE LoadRunner in C
C
4
star
35

linkedpackage

Filter package list by actual usage
Go
3
star
36

a5er-dictionary

Go
3
star
37

apidoor

apidoor is a framework that can be used to build a WebAPI platform
Go
3
star
38

uroborosql-sample

uroborosql usecase sample
Java
3
star
39

go-exceltesting

Go data insert into dababase tool for table driven testing using excel
Go
3
star
40

redmine_single_mail

Ruby
3
star
41

backlogslackify

Go
2
star
42

uroborosql-doc

uroboroSQL documentation
HTML
1
star
43

gocloudurls

gcloud.dev helper to manage urls
Go
1
star