# @hisp-amr/org-unit-tree

> DHIS2 single select organisation unit tree

Latest version **0.0.17** (published 2019-10-02) · BSD-3-Clause license · 0 weekly downloads

## Install

```sh
npm install @hisp-amr/org-unit-tree
pnpm add @hisp-amr/org-unit-tree
yarn add @hisp-amr/org-unit-tree
bun add @hisp-amr/org-unit-tree
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.17 |
| Published | 2019-10-02 |
| First published | 2019-09-17 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 21.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | teug91 |

## Links

- npm: https://www.npmjs.com/package/@hisp-amr/org-unit-tree
- Repository: https://github.com/hispindia/amr-apps
- Homepage: https://github.com/hispindia/amr-apps#readme
- Issues: https://github.com/hispindia/amr-apps/issues
- npm.io page: https://npm.io/package/@hisp-amr/org-unit-tree

## Dependencies (3)

- [@hisp-amr/api](https://npm.io/package/@hisp-amr/api.md) 0.0.8
- [@dhis2/ui-core](https://npm.io/package/@dhis2/ui-core.md) ^3.9.1
- [styled-components](https://npm.io/package/styled-components.md) ^5.0.0-beta.8

## Recent versions

- 0.0.17 (latest) — 2019-10-02
- 0.0.16 — 2019-10-02
- 0.0.15 — 2019-09-28
- 0.0.14 — 2019-09-18
- 0.0.13 — 2019-09-18
- 0.0.12 — 2019-09-17
- 0.0.11 — 2019-09-17
- 0.0.10 — 2019-09-17
- 0.0.9 — 2019-09-17
- 0.0.8 — 2019-09-17
- 0.0.7 — 2019-09-17
- 0.0.6 — 2019-09-17
- 0.0.5 — 2019-09-17
- 0.0.4 — 2019-09-17
- 0.0.3 — 2019-09-17
- … 2 more at https://npm.io/package/@hisp-amr/org-unit-tree/versions

## README

# org-unit-tree

## Installation

```bash
yarn add @hisp-amr/org-unit-tree
# or
npm i @hisp-amr/org-unit-tree
```

## Usage
`REACT_APP_DHIS2_BASE_URL` needs to be set.

```bash
# [root_dir]/.env.development
REACT_APP_DHIS2_BASE_URL=https://amrtest.icmr.org.in/amr
```

```bash
# [root_dir]/.env.production
REACT_APP_DHIS2_BASE_URL=../../..
```

```jsx
import React from 'react'
import { OrgUnitTree } from '@hisp-amr/org-unit-tree'

const onError = error => console.error(error)
const onSelect = selected => console.log(selected)

const App = () => (
    <>
        {/* Other components */}
        <OrgUnitTree
            onSelect={onSelect}
            onError={onError}
        />
    </>
)
```

---
_Source: https://npm.io/package/@hisp-amr/org-unit-tree · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
