react-chosen

WebJar for react-chosen

Лицензия

Лицензия

MIT
Категории

Категории

React Взаимодействие с пользователем Веб-фреймворки
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

react-chosen
Последняя версия

Последняя версия

0.3.8
Дата

Дата

Тип

Тип

jar
Описание

Описание

react-chosen
WebJar for react-chosen
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/chenglou/react-chosen

Скачать react-chosen

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/react-chosen/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>react-chosen</artifactId>
    <version>0.3.8</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/react-chosen/
implementation 'org.webjars.npm:react-chosen:0.3.8'
// https://jarcasting.com/artifacts/org.webjars.npm/react-chosen/
implementation ("org.webjars.npm:react-chosen:0.3.8")
'org.webjars.npm:react-chosen:jar:0.3.8'
<dependency org="org.webjars.npm" name="react-chosen" rev="0.3.8">
  <artifact name="react-chosen" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='react-chosen', version='0.3.8')
)
libraryDependencies += "org.webjars.npm" % "react-chosen" % "0.3.8"
[org.webjars.npm/react-chosen "0.3.8"]

Зависимости

compile (3)

Идентификатор библиотеки Тип Версия
org.webjars.npm » drmonty-chosen jar [1.4.2,1.5)
org.webjars.npm : jquery jar [2.1.1,3)
org.webjars.npm : react jar [0.13.0,0.14)

Модули Проекта

Данный проект не имеет модулей.

React-chosen

This project has been deprecated. Please use React-select, a pure React-based solution, instead. Thanks!

React wrapper for Chosen jQuery.

install

bower install react-chosen

Or simply drop the script somewhere on your page (after React and Chosen of course):

<script src="path/to/react-chosen.js"></script>

The npm build works, but unfortunately not well:

npm install react-chosen

Due to the awkwardness of Chosen and jQuery on npm, you'll still have to include jQuery as a global dependency. Installing via npm is not recommended.

API

Please refer to Chosen's API. It's pretty much the same, except:

  • Every Chosen option employs camelCase, e.g. disable_search_threshold -> disableSearchThreshold.

  • Just like React's controlled component, value controls your select and makes it immune to changes unless you specify so.

Example

/** @jsx React.DOM */
React.renderComponent(
  <Chosen noResultsText="No result" value="Harvest" onChange={doSomething}>
    <option value="Facebook">Facebook</option>
    <option value="Harvest">Harvest</option>
  </Chosen>
, document.body);

// or multi-select
React.renderComponent(
  <Chosen defaultValue={["Apple"]} width="92px" data-placeholder="Select..." multiple>
    <option value="Apple">Apple</option>
    <option value="Facebook">Facebook</option>
    <option value="Harvest">Harvest</option>
  </Chosen>
, document.body);

License

MIT.

Версии библиотеки

Версия
0.3.8