yii2-selectize-widget

Selectize From Brian Reavis Yii2 Widget

Github星跟踪图

Selectize JS Widget for Yii2

Latest Version
Software License
Build Status
Coverage Status
Quality Score
Total Downloads

Selectize is an extensible jQuery-based custom <select> UI control. It's useful for tagging, contact lists, country selectors, and so on. It clocks in at around ~7kb (gzipped). The goal is to provide a solid & usable experience with a clean and powerful API.

Installation

The preferred way to install this extension is through composer.

Either run

$ composer require 2amigos/yii2-selectize-widget:~1.0

or add

"2amigos/yii2-selectize-widget": "~1.0"

to the require section of your composer.json file.

Usage

Selectize has lots of configuration options. For further information, please check the Selectize plugin website.

Text input widget

To use text input widget add the following to the view

use dosamigos\selectize\SelectizeTextInput;

echo SelectizeTextInput::widget([
    'name' => 'tags',
    'value' => 'love, this, game',
    'clientOptions' => [
        // ...
    ],
]);

To use dropdown list widget add the following to the view

use dosamigos\selectize\SelectizeDropDownList;

echo SelectizeDropDownList::widget([
    'name' => 'tags',
    'items' => ['love', 'this', 'game'],
    'clientOptions' => [
        // ...
    ],
]);

Configuration

SelectizeDropDownList extends from InputWidget, but have additional properties that can be configured., Property, Type, Default, Description, -, -, -, -, loadUrl, string|array, null, Optional. This parameter will be passed to Url::to. If set, selectize plugin will be configured to send ajax requests to the defined url to retrieve options. Url must return a valid JSON response., queryParam, string, 'query', The name of the request parameter to use on ajax requests, clientOptions, array, null, Configuration of selectize plugin. This configuration is individual for each selectize instance., ## Testing

$ ./vendor/bin/phpunit

Contributing

Please see CONTRIBUTING for details.

Credits

License

The BSD License (BSD). Please see License File for more information.

主要指标

概览
名称与所有者2amigos/yii2-selectize-widget
主编程语言PHP
编程语言PHP (语言数: 1)
平台
许可证Other
所有者活动
创建于2014-01-14 11:04:00
推送于2018-06-08 14:21:01
最后一次提交2018-02-12 19:21:32
发布数8
最新版本名称1.1.0 (发布于 2017-09-20 00:03:43)
第一版名称0.1.0 (发布于 2014-04-20 12:58:10)
用户参与
星数72
关注者数19
派生数40
提交数107
已启用问题?
问题数35
打开的问题数8
拉请求数6
打开的拉请求数1
关闭的拉请求数4
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?