项目作者: tomi77

项目描述 :
Backbone-Forms chosen editor
高级语言: CoffeeScript
项目地址: git://github.com/tomi77/backbone-forms-chosen.git
创建时间: 2017-06-14T18:58:04Z
项目社区:https://github.com/tomi77/backbone-forms-chosen

开源协议:MIT License

下载


Backbone-Forms Chosen editor

Code Climate
Build Status
Coverage Status
Dependency Status
devDependencies Status
peerDependencies Status
Downloads

A Backbone-Forms editor that covers Chosen functionality.

Installation

Via bower:

  1. bower install backbone-forms-chosen

Via npm:

  1. npm install backbone-forms-chosen

Usage

Just replace Select editor type with chosen.

Change placeholder

Add data-placeholder to editorAttrs.

  1. schema: {
  2. states: {
  3. type: 'chosen',
  4. title: 'States',
  5. options: states,
  6. editorAttrs: {
  7. multiple: 'multiple',
  8. 'data-placeholder': 'Select countries...'
  9. }
  10. }
  11. }

Add extra chosen editor options

Add editorOptions to schema.

  1. schema: {
  2. states: {
  3. type: 'chosen',
  4. title: 'States',
  5. options: states,
  6. editorOptions: {
  7. no_results_text: 'Oops, nothing found!'
  8. }
  9. }
  10. }

Demo

https://tomi77.github.io/backbone-forms-chosen/