atable 0.2.0
Install from the command line:
Learn more about npm packages
$ npm install @agritheory/atable@0.2.0
Install via package.json:
"@agritheory/atable": "0.2.0"
About this version
Key navigation
Key(s) | Function |
---|---|
Enter | downCell |
Tab | nextCell |
Shift + Enter | upCell |
Shift+ Tab | prevCell |
← | prevCell |
↑ | upCell |
→ | nextCell |
↓ | downCell |
Home | lastCell |
End | firstCell |
The primary API for ATable is the column object.
-
title
: String; optional -
name
: String; required (a reference to the column that must follow rules for valid JS variable naming) -
type
: String; optional (a valid data types, full list below) -
align
: String; optional (one ofleft
,right
orcenter
; defaults tocenter
) -
edit
: Boolean; optional (indicates if the field is editable; defaults tofalse
) -
width
: String; optional (used to indicate the width of the cell; defaults to40ch
) -
mask
: Function; optional (a custom mask for the field, several are provided with types by default) -
options
: Function; optional (used withSelect
,Currency
, andQuantity
fields)
{
title: 'Batch Name',
name: 'name',
type: 'Data',
align: 'right',
edit: false,
},
{
title: 'Species',
name: 'species',
type: 'Select',
align: 'left',
edit: true,
width: '30ch',
required: true,
options: () => ['Rainbow Trout', 'Steelhead', 'Golden Trout', 'Pacific Salmon']
},
{
title: 'Date',
name: 'set_date',
type: 'Date',
align: 'center',
edit: true,
width: '30ch',
mask: value => `${value}+/-`,
}
v0.1
- Data/ Text (unformatted text)
- Number (can be backed by int, decimal or float)
- Hyperlink
- Currency
- Quantity
- Date
- Date Range
- Select / Datalist / Combobox
v0.2
- Rich Text Editor
- Image
- File
- Diagram