Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

luna-data-grid

Package Overview
Dependencies
Maintainers
0
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

luna-data-grid

Grid for displaying datasets

  • 1.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

Luna Data Grid

Grid for displaying datasets.

Demo

https://luna.liriliri.io/?path=/story/data-grid

Install

Add the following script and style to your page.

<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/luna-data-grid/luna-data-grid.css" />
<script src="//cdn.jsdelivr.net/npm/luna-data-grid/luna-data-grid.js"></script>

You can also get it on npm.

npm install luna-data-grid --save
import 'luna-data-grid/luna-data-grid.css'
import LunaDataGrid from 'luna-data-grid'

Usage

const dataGrid = new DataGrid(container, {
  columns: [
    {
      id: 'name',
      title: 'Name',
      sortable: true,
    },
    {
       id: 'site',
       title: 'Site',
     },
  ],
})

dataGrid.append({
  name: 'Runoob',
  site: 'www.runoob.com',
})

Configuration

  • columns(IColumn[]): Table columns.
  • filter(string | RegExp | AnyFn): Data filter.
  • height(number): Table height.
  • maxHeight(number): Max table height.
  • minHeight(number): Min table height.

Api

append(data: NodeData, options?: IDataGridNodeOptions): DataGridNode

Append row data.

clear(): void

Clear all data.

remove(node: DataGridNode): void

Remove row data.

setData(data: NodeData | [], uniqueId?: string): void

Set data.

Types

IColumn

  • comparator(AnyFn): Column sort comparator if sortable is true.
  • id(string): Column id.
  • sortable(boolean): Is column sortable.
  • title(string): Column display name.
  • weight(number): Column weight.

IDataGridNodeOptions

  • selectable(boolean): Whether the node is selectable.

Keywords

FAQs

Package last updated on 22 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc