# rollun-ts-grid

> Brand new rollun grid made using [Dojo](https://dojo.io/).

Latest version **0.4.9** (published 2019-04-08) · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install rollun-ts-grid
pnpm add rollun-ts-grid
yarn add rollun-ts-grid
bun add rollun-ts-grid
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.4.9 |
| Published | 2019-04-08 |
| First published | 2018-12-24 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 1.8 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | rollun-com |

## Links

- npm: https://www.npmjs.com/package/rollun-ts-grid
- npm.io page: https://npm.io/package/rollun-ts-grid

## Dependencies (8)

- [tslib](https://npm.io/package/tslib.md) ~1.8.1
- [lodash](https://npm.io/package/lodash.md) ^4.17.11
- [@dojo/widgets](https://npm.io/package/@dojo/widgets.md) ^5.0.0
- [rollun-common](https://npm.io/package/rollun-common.md) ^1.0.1
- [rollun-ts-rql](https://npm.io/package/rollun-ts-rql.md) ^0.4.2
- [@dojo/framework](https://npm.io/package/@dojo/framework.md) ^5.0.0
- [rollun-ts-datastore](https://npm.io/package/rollun-ts-datastore.md) ^0.3.1
- [rollun-common-widgets](https://npm.io/package/rollun-common-widgets.md) ^1.0.7

## Recent versions

- 0.4.9 (latest) — 2019-04-08
- 0.4.8 — 2019-04-05
- 0.4.7 — 2019-04-05
- 0.4.6 — 2019-04-05
- 0.4.5 — 2019-03-28
- 0.4.4 — 2019-03-27
- 0.4.3 — 2019-03-27
- 0.4.2 — 2019-03-21
- 0.4.1 — 2019-03-12
- 0.3.12 — 2019-03-04
- 0.3.11 — 2019-02-27
- 0.3.10 — 2019-02-27
- 0.3.9 — 2019-02-27
- 0.3.8 — 2019-02-13
- 0.3.7 — 2019-02-11
- … 23 more at https://npm.io/package/rollun-ts-grid/versions

## README

# rollun-ts-grid

Brand new rollun grid made using [Dojo](https://dojo.io/).

## Installation
preferred way to install this library is via npm. Run
```
npm install rollun-ts-grid
```
or add
```
"rollun-ts-grid": "*",
```
to the dependencies section of your package.json

## Usage
### Basic usage
```typescript
import renderer from '@dojo/framework/widget-core/vdom';
import { w } from '@dojo/framework/widget-core/d';
import { Registry } from '@dojo/framework/widget-core/Registry';
import GridContext from 'rollun-ts-grid/dist/all/context/GridContext';
import Grid from 'rollun-ts-grid/dist/all/gridWidgets/grid';
import { RowRows, RowFields } from 'rollun-ts-grid/dist/all/common/interfaces';

const rowRows: RowRows = {
	rows: [
		{
			id: 0,
			cells: [
				{value: '1'},
				{value: '2'},
				{value: '3'},
				{value: '4'},
			]
		},
		{
			id: 1,
			cells: [
				{value: '1'},
				{value: '2'},
				{value: '3'},
				{value: '4'},
			]
		},
		{
			id: 2,
			cells: [
				{value: '1'},
				{value: '2'},
				{value: '3'},
				{value: '4'},
			]
		},
		{
			id: 3,
			cells: [
				{value: '1'},
				{value: '2'},
				{value: '3'},
				{value: '4'},
			]
		},
		{
			id: 4,
			cells: [
				{value: '1'},
				{value: '2'},
				{value: '3'},
				{value: '4'},
			]
		},
	]
};
const rowFields: RowFields = {
	fieldsInfo: [
		{name: 'A'},
		{name: 'B'},
		{name: 'C'},
		{name: 'D'},
	]
};
let gridContext: GridContext;
const registry = new Registry();
registry.defineInjector('gridContext',
	(invalidator: () => void) => {
		gridContext = new GridContext(invalidator, {
			rows: rowRows,
			fields: rowFields
		});
		return () => gridContext;
	}
);
const r = renderer(() => w(Grid, {context: gridContext}));
r.mount({
	registry
});
```
Code above renders a 4x4 grid

### Render QueryApp
```typescript

```

---
_Source: https://npm.io/package/rollun-ts-grid · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
