Gathering detailed insights and metrics for @lordfriend/nya-bootstrap-select
Gathering detailed insights and metrics for @lordfriend/nya-bootstrap-select
Gathering detailed insights and metrics for @lordfriend/nya-bootstrap-select
Gathering detailed insights and metrics for @lordfriend/nya-bootstrap-select
npm install @lordfriend/nya-bootstrap-select
Add reset search when press enter key
Published on 09 Jan 2018
Add feature to reset live-search state when dropdown closed
Published on 05 Dec 2017
hide actionbox and live search box in link phase when there attribute value change to false
Published on 04 May 2017
Add support for ngDisabled, Add null as valid empty modelValue
Published on 29 Apr 2017
Fix bug of action box when combine with live-search
Published on 21 Mar 2017
performance improve and add cmd support.
Published on 16 Nov 2016
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
178 Stars
223 Commits
80 Forks
8 Watching
2 Branches
14 Contributors
Updated on 14 Oct 2024
JavaScript (94.93%)
CSS (5.07%)
Cumulative downloads
Total Downloads
Last day
-54.4%
31
Compared to previous day
Last week
-33.9%
207
Compared to previous week
Last month
-2.6%
1,068
Compared to previous month
Last year
-22.7%
16,241
Compared to previous year
32
nya-bootstrap-select v2 is an AngularJS directive set inspired by @silviomoreto 's bootstrap-select . With this directive you can built an bootstrap-select with data-binding feature of angularjs. The 2.x version is totally rewritten. while keep the most feature of bootstrap-select but no longer depends jquery and bootstrap-select plugin.
Require: angular 1.2+
Install
Install via bower:
bower install nya-bootstrap-select --save
Install via npm:
npm install @lordfriend/nya-bootstrap-select --save
include the nya-bootstrap-select.js and nya-bootstrap-select.css file to your html.
add to application dependecies.
angular.module('yourApp', ['nya.bootstrap.select'])
add code to your view template. you need two directive: nya-bs-select
and nya-bs-option
to build your select picker. nya-bs-select is a class, attribute, tag stricted directive. while nya-bs-option is an attribute stricted directive. Also, you need ng-model add to the nya-bs-select element to bind your model.
1<ol class="nya-bs-select" ng-model="myModel"> 2 <li nya-bs-option="option in options"> 3 <a> 4 {{option.name}} 5 </a> 6 </li> 7</ol>
Migrate from 1.x If you have used the previous version of this directive. you need to replace the old code in the template. See the examples below
You can use static options which means you can't change the option when the HTML code is ready. Under this usage, you don't use the nya-bs-option
directive, but you should add nya-bs-option
class to all the <li>
element and data-value
attribute to let the directive know you option's value.
1<ol class="nya-bs-select" ng-model="myModel"> 2 <li data-value="alpha" class="nya-bs-option"> 3 <a> 4 Alpha 5 </a> 6 </li> 7 <li data-value="beta" class="nya-bs-option"> 8 <a> 9 Beta 10 </a> 11 </li> 12 <li data-value="charlie" class="nya-bs-option"> 13 <a> 14 Charlie 15 </a> 16 </li> 17</ol>
If you decide to use static option, you shouldn't change the option any more, otherwise you may need the nya-bs-option
directive to generate options dynamically.
In this section you'll see several usage of the nya-bs-option
directive.
This is the very basic usage, we have an array of object used to generate options. the myModel
will be one of the objects in the options
array. if you add an multiple
attribute to the nya-bs-select
element. myModel
will be array of objects.
1<ol class="nya-bs-select" ng-model="myModel"> 2 <li nya-bs-option="option in options"> 3 <a>{{option.name}}</a> 4 </li> 5</ol>
Like vanilla <select>
we can also generate option group with any property in an object. if you options
is an array of object. like [{name: "alpha", group: "Group 1"}, {name: "beta", group: "Group 2}, {name: "charlie", group: "Group 2"}]. then we can use group by in nya-bs-option
expression to generate group.
1<ol class="nya-bs-select" ng-model="myModel"> 2 <li nya-bs-option="option in options group by option.group"> 3 <span class="dropdown-header">{{$group}}</span> 4 <a> 5 {{option.name}} 6 </a> 7 </li> 8</ol>
This project is built by Grunt, fork this project. and clone to your local repository. Run yarn install
to install all development dependencies.
Source files are separated to several files. Run grunt build
will do some karma unit test and combine these files to one single file and compress the js and css files.
e2e test is not available temporarily, I will add those test in the future.
Something should be noticed:
Licensed under the MIT license
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 6/20 approved changesets -- score normalized to 3
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
128 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More