Socket
Socket
Sign inDemoInstall

@data-cafe/datagrid

Package Overview
Dependencies
21
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @data-cafe/datagrid

A very generic datagrid component for data-café applications


Version published
Maintainers
1
Created

Readme

Source

Datagrid

This datagrid is a simple, flexible, and extensible datagrid component, made for data·café applications.

However, it is designed to be used in any Angular + Clarity project.

If you are interested in using this component with another tech stack using WebComponent, please consider contribution or contact us.

Demo

Youtube video:

@data-cafe/datagrid video

Features

Here some handy features:

  • Display simple items
  • Edit in-cell
  • Localize texts

Future features in our roadmap:

  • pagination
  • OpenAPI structure and data driven

Items

The datagrid consumes simple list of items, yet.

<dt-datagrid [items]="[ ... ]"></dt-datagrid>

The structure of the grid (aka the columns) is defined by the properties of the first item.

Edit

The datagrid allows you to edit the items in-cell.

<dt-datagrid (edit)="onEdit($event)" editable></dt-datagrid>

Note: the editable property could be used sandalone or with a boolean [editable]="true".

Available properties for edit event:

PropertyTypeDescription
previousyour Item typeAn item with previous values
updatedyour Item typeAn item with updated values
updatedPropertiesstring[]List of updated properties

Texts

You can customise the component texts for i18n purposes.

<dt-datagrid [texts]="{ ... }"></dt-datagrid>

Available text properties:

PropertyTypeRequiredDescription
h1stringnoHeader title level 1
h2stringnoHeader title level 2
h3stringnoHeader title level 3
topstringnoTop text paragraph
placeholderstringnoGrid placeholder if the grid is empty
fallbackLabelstringnoCell fallback is a value is missing
Note: could be overriden within Structure for each column.
counter(number?) => stringnoFunction that produce the item count for grid footer
bottomstringnoBottom text paragraph

Development

This library was generated with Angular CLI version 13.1.0.

Please read the README of the project.

Keywords

FAQs

Last updated on 06 Jan 2022

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc