1.0.0 • Published 1 year ago

@ialopezg/react-ui v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

React UI

Components & Helper Functions for ReactJS and NodeJS

Coverage Status

Table Of Content

Getting Started

Installing

$ npm install --save @ialopez/react-ui

Properties

DataTable

PropertyTypeRequiredDefaultDescription
titlestringfalsenullDataTable title
dataDataOptionstrueData options. Contains the column and row collections.
Data
PropertyTypeRequiredDefaultDescription
columnsDataColumnstrue[]An array of DataColumns objects that defines the DataTable columns.
rowsDataRowstrue[]An array of DataRows objects that defines the DataTable columns.

Columns

Represents an array of DataColumn objects of a DataTable component.

PropertyTypeRequiredDefaultDescription
idstringtrueColumn ID (must be unique).
labelstringtrueColumn label.
sizestringfalseColumn size (between 1px and 15px).
editablebooleanfalsefalseWhether column value is editable.
typestringfalsestringColumn content type. Possible values: boolean, text, number, date, datetime, time.
componentstringfalseComponent when row value is editable (input, textarea, select, etc.).
formatstringfalselocale formatColumn date format when type is date. Required only when column type is date.
optionsOptionfalse[]An array of Option objects for select components. Required only when component type is select.
requiredbooleanfalsefalseWhether column content is required.
validationFunctionfalseA callable function to validate column data values.

Rows

Represents an array of DataRow objects of a DataTable component.

PropertyTypeRequiredDefaultDescription
idstringtrueRow ID.

Note: All other values will be cast as key pair object according the column definition.

Contributors

1.0.0

1 year ago

1.1.0

1 year ago