0.1.2 • Published 2 years ago

@data-terrae/datagrid v0.1.2

Weekly downloads
-
License
AGPL-3.0
Repository
gitlab
Last release
2 years ago

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-terrae/datagrid v.0.1.0

Features

Here some handy features:

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 missingNote: 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.

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.1

2 years ago