fedemotta / yii2-bootstrap-list-filter
Bootstap list filter widget for Yii2
Installs: 1 155
Dependents: 0
Suggesters: 0
Security: 0
Stars: 7
Watchers: 2
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- bower-asset/bootstrap-list-filter: *
- bower-asset/jquery: *
- yiisoft/yii2: *
- yiisoft/yii2-bootstrap: *
This package is not auto-updated.
Last update: 2024-10-22 03:40:44 UTC
README
Bootstrap list filter widget for Yii2
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist fedemotta/yii2-bootstrap-list-filter "*"
or add
"fedemotta/yii2-bootstrap-list-filter": "*"
to the require section of your composer.json
file.
Usage
Once the extension is installed, simply use it in your code by :
<form role="form"> <div class="form-group"> <?=\fedemotta\bootstraplistfilter\BootstrapListFilter::widget(['list_selector'=>'#searchlist','options'=>['class'=>'form-control', 'placeholder'=>'Search...'], 'clientOptions'=>['itemChild'=>'span']]); ?> </div> <div id="searchlist" class="list-group"> <a class="list-group-item" href="aquamarine.html"><span>aquamarine</span></a> <a class="list-group-item" href="blue.html"><span>blue</span></a> <a class="list-group-item" href="cyan.html"><span>cyan</span></a> </div> </form>