# ember-simple-select

> A simple component for your Ember 2.0+ apps.

Latest version **0.6.1** (published 2017-06-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install ember-simple-select
pnpm add ember-simple-select
yarn add ember-simple-select
bun add ember-simple-select
```

## 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.6.1 |
| Published | 2017-06-01 |
| First published | 2015-10-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.10.0 |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Xavier Cambar |
| Maintainers | xcambar |
| Keywords | ember-addon |

## Links

- npm: https://www.npmjs.com/package/ember-simple-select
- Repository: https://github.com/novafloss/ember-simple-select
- Issues: https://github.com/novafloss/ember-simple-select/issues
- npm.io page: https://npm.io/package/ember-simple-select

## Dependencies (3)

- [ember-cli-babel](https://npm.io/package/ember-cli-babel.md) ^5.1.5
- [ember-cli-htmlbars](https://npm.io/package/ember-cli-htmlbars.md) ^1.0.1
- [ember-cli-htmlbars-inline-precompile](https://npm.io/package/ember-cli-htmlbars-inline-precompile.md) ^0.3.1

## Recent versions

- 0.6.1 (latest) — 2017-06-01
- 0.6.0 — 2016-06-14
- 0.5.1 — 2016-05-25
- 0.5.0 — 2015-12-03
- 0.4.0 — 2015-11-05
- 0.3.0 — 2015-11-04
- 0.2.0 — 2015-10-16
- 0.1.0 — 2015-10-08

## README

# Ember-simple-select [![Travis-CI badge](https://travis-ci.org/novafloss/ember-simple-select.svg)](https://travis-ci.org/novafloss/ember-simple-select)

this Repo is a shameless copy/paste from [this JSBin](http://jsbin.com/fotuqa).

It offers a `{{simple-select}}` component that comes as a replacement
for the deprecated `Ember.Select`, while following all the Ember 2.0 guidelines.

## Installation

`$ ember install ember-simple-select`

`ember-get-helper` is required for ember 1.13.

## Usage

```handlebars
{{# With `selection`, you give an object
    that corresponds to the selection}}
{{simple-select
    content=yourData
    optionValuePath="id"
    optionLabelPath="displayName"
    selection=currentlySelectedObject
    prompt="Please select a value"
    action=doSomethingWhenTheSelectionChanged}}

{{# Here you give the value}}
{{simple-select
    content=yourData
    optionValuePath="id"
    optionLabelPath="displayName"
    value=currentlySelectedValue
    prompt="Please select a value"
    action=doSomethingWhenTheSelectionChanged}}
```

If you want to use the prompt as an empty value, you can do that by using the `allowEmpty` property:
```handlebars
{{simple-select
    ...
    prompt="Please select a value"
    allowEmpty: true}}
```

### Receiving actions

The receiving actions will be called with 2 arguments:

* The `selection`, which is the object that corresponds to the selected entry from `content`.
* The `value` that is the actual value in the `<option>` tag (resolved by `optionValuePath`).

# Contribute

## Installation

* `git clone` this repository
* `npm install`
* `bower install`

## Running

* `ember server`
* Visit your app at http://localhost:4200.

## Running Tests

* `npm test` (Runs `ember try:testall` to test your addon against multiple Ember versions)
* `ember test`
* `ember test --server`

## Building

* `ember build`

For more information on using ember-cli, visit [http://www.ember-cli.com/](http://www.ember-cli.com/).

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