Installations
npm install @lordfriend/nya-bootstrap-select
Releases
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
Developer
Developer Guide
Module System
CommonJS
Min. Node Version
Typescript Support
No
Node Version
9.0.0
NPM Version
5.5.1
Statistics
178 Stars
223 Commits
80 Forks
8 Watching
2 Branches
14 Contributors
Updated on 14 Oct 2024
Languages
JavaScript (94.93%)
CSS (5.07%)
Total Downloads
Cumulative downloads
Total Downloads
157,739
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
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dev Dependencies
32
nya-bootstrap-select
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+
This project is currently in maintenance state, it will only accept bug fix Pull Request, will not accept any new feature.
Usage
-
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
andnya-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
Examples
Static Options
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.
Dynamic Options
In this section you'll see several usage of the nya-bs-option
directive.
Basic usage
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>
Group By Object Property
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>
TODO
- data-header support
data-container supportmay not be supported any more- data-max-options support
- auto dropup support
How to Contribute
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:
- If you add a feature, you should add a unit test case. The unit test using karma runner and jasmine 1.5 framework. you can add new test spec files in test/spec folder.
- For any Pull Request, you should only modify the src files and documents, test specs. Do not update dist files, package.json, bower.json or try to update project version.
- Any feature should work without jquery.
License
Licensed under the MIT license
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
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
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 16 are checked with a SAST tool
Reason
128 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-3v6h-hqm4-2rg6
- Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw
- Warn: Project is vulnerable to: GHSA-89mq-4x47-5v83
- Warn: Project is vulnerable to: GHSA-5cp4-xmrw-59wf
- Warn: Project is vulnerable to: GHSA-mhp6-pxh8-r675
- Warn: Project is vulnerable to: GHSA-2qqx-w9hr-q5gx
- Warn: Project is vulnerable to: GHSA-2vrf-hf26-jrp5
- Warn: Project is vulnerable to: GHSA-4w4v-5hc9-xrr2
- Warn: Project is vulnerable to: GHSA-m9gf-397r-hwpg
- Warn: Project is vulnerable to: GHSA-mqm9-c95h-x2p6
- Warn: Project is vulnerable to: GHSA-prc3-vjfx-vhm9
- Warn: Project is vulnerable to: GHSA-qwqh-hm9m-p5hr
- Warn: Project is vulnerable to: GHSA-pp7h-53gx-mx7r
- Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7
- Warn: Project is vulnerable to: GHSA-3mgp-fx93-9xv5
- Warn: Project is vulnerable to: GHSA-3wqf-4x89-9g79
- Warn: Project is vulnerable to: GHSA-4p24-vmcr-4gqj
- Warn: Project is vulnerable to: GHSA-7mvr-5x2g-wfc8
- Warn: Project is vulnerable to: GHSA-ph58-4vrj-w6hr
- Warn: Project is vulnerable to: GHSA-9v3m-8fp8-mj99
- Warn: Project is vulnerable to: GHSA-vxmc-5x29-h64v
- Warn: Project is vulnerable to: GHSA-9mvj-f7w8-pvh2
- Warn: Project is vulnerable to: GHSA-832h-xg76-4gv6
- Warn: Project is vulnerable to: GHSA-cwfw-4gq5-mrqx
- Warn: Project is vulnerable to: GHSA-g95f-p29q-9xw4
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-wxhq-pm8v-cw75
- Warn: Project is vulnerable to: GHSA-6cpc-mj5c-m9rq
- Warn: Project is vulnerable to: GHSA-g74r-ffvr-5q9f
- Warn: Project is vulnerable to: GHSA-rch9-xh7r-mqgw
- Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x
- Warn: Project is vulnerable to: GHSA-92vm-wfm5-mxvv
- Warn: Project is vulnerable to: GHSA-9vvw-cc9w-f27h
- Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c
- Warn: Project is vulnerable to: GHSA-hr2v-3952-633q
- Warn: Project is vulnerable to: GHSA-j4f2-536g-r55m
- Warn: Project is vulnerable to: GHSA-r7qp-cfhv-p84w
- Warn: Project is vulnerable to: GHSA-qrmc-fj45-qfc2
- Warn: Project is vulnerable to: GHSA-9qj9-36jm-prpv
- Warn: Project is vulnerable to: GHSA-8r6j-v8pm-fqw3
- Warn: Project is vulnerable to: MAL-2023-462
- Warn: Project is vulnerable to: GHSA-xf7w-r453-m56c
- Warn: Project is vulnerable to: GHSA-957j-59c2-j692
- Warn: Project is vulnerable to: GHSA-m5pj-vjjf-4m3h
- Warn: Project is vulnerable to: GHSA-j383-35pm-c5h4
- Warn: Project is vulnerable to: GHSA-rm36-94g8-835r
- Warn: Project is vulnerable to: GHSA-rrj3-qmh8-72pf
- Warn: Project is vulnerable to: GHSA-hcj4-xf6x-63wj
- Warn: Project is vulnerable to: GHSA-jcpv-g9rr-qxrc
- Warn: Project is vulnerable to: GHSA-44pw-h2cw-w3vq
- Warn: Project is vulnerable to: GHSA-vfrc-7r7c-w9mx
- Warn: Project is vulnerable to: GHSA-jp4x-w63m-7wgm
- Warn: Project is vulnerable to: GHSA-c429-5p7v-vgjp
- Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj
- Warn: Project is vulnerable to: GHSA-6x33-pw7p-hmpq
- Warn: Project is vulnerable to: GHSA-8g7p-74h8-hg48
- Warn: Project is vulnerable to: GHSA-pc5p-h8pf-mvwp
- Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37
- Warn: Project is vulnerable to: GHSA-4hpf-3wq7-5rpr
- Warn: Project is vulnerable to: GHSA-f522-ffg8-j8r6
- Warn: Project is vulnerable to: GHSA-6c3j-c64m-qhgq
- Warn: Project is vulnerable to: GHSA-gxr4-xjj5-5px2
- Warn: Project is vulnerable to: GHSA-jpcq-cgw6-v4j6
- Warn: Project is vulnerable to: GHSA-2pr6-76vf-7546
- Warn: Project is vulnerable to: GHSA-8j8c-7jfh-h6hx
- Warn: Project is vulnerable to: GHSA-896r-f27r-55mw
- Warn: Project is vulnerable to: GHSA-282f-qqgm-c34q
- Warn: Project is vulnerable to: GHSA-7x7c-qm48-pq9c
- Warn: Project is vulnerable to: GHSA-rc3x-jf5g-xvc5
- Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695
- Warn: Project is vulnerable to: GHSA-fvqr-27wr-82fm
- Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574
- Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-82v2-mx6x-wq7q
- Warn: Project is vulnerable to: GHSA-7px7-7xjx-hxm8
- Warn: Project is vulnerable to: GHSA-x5pg-88wf-qq4p
- Warn: Project is vulnerable to: GHSA-5v2h-r2cx-5xgj
- Warn: Project is vulnerable to: GHSA-rrrm-qjm4-v8hf
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-wrvr-8mpx-r7pp
- Warn: Project is vulnerable to: GHSA-hxm2-r34f-qmc5
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m / GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-w9mr-4mfr-499f
- Warn: Project is vulnerable to: GHSA-7mc5-chhp-fmc3
- Warn: Project is vulnerable to: GHSA-28xh-wpgr-7fm8
- Warn: Project is vulnerable to: GHSA-q75g-2496-mxpp
- Warn: Project is vulnerable to: GHSA-f9cm-p3w6-xvr3
- Warn: Project is vulnerable to: GHSA-jjv7-qpx3-h62q
- Warn: Project is vulnerable to: GHSA-gqgv-6jq5-jjj9
- Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp
- Warn: Project is vulnerable to: GHSA-6g33-f262-xjp4
- Warn: Project is vulnerable to: GHSA-7xfp-9c55-5vqj
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-xwg4-93c6-3h42
- Warn: Project is vulnerable to: GHSA-jgqf-hwc5-hh37
- Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg
- Warn: Project is vulnerable to: GHSA-4rq4-32rv-6wp6
- Warn: Project is vulnerable to: GHSA-64g7-mvw6-v9qj
- Warn: Project is vulnerable to: GHSA-fxwf-4rqh-v8g3
- Warn: Project is vulnerable to: GHSA-25hc-qcg6-38wj
- Warn: Project is vulnerable to: GHSA-xfhh-g9f5-x4m4
- Warn: Project is vulnerable to: GHSA-qm95-pgcg-qqfq
- Warn: Project is vulnerable to: GHSA-cqmj-92xf-r6r9
- Warn: Project is vulnerable to: GHSA-2m39-62fm-q8r3
- Warn: Project is vulnerable to: GHSA-mf6x-7mm4-x2g7
- Warn: Project is vulnerable to: GHSA-j44m-qm6p-hp7m
- Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9
- Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh
- Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36
- Warn: Project is vulnerable to: GHSA-g7q5-pjjr-gqvp
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v
- Warn: Project is vulnerable to: GHSA-xc7v-wxcw-j472
- Warn: Project is vulnerable to: GHSA-cf4h-3jhx-xvhq
- Warn: Project is vulnerable to: GHSA-v2p6-4mp7-3r9v
- Warn: Project is vulnerable to: GHSA-pjmx-9xr3-82qr
- Warn: Project is vulnerable to: GHSA-mgfv-m47x-4wqp
- Warn: Project is vulnerable to: GHSA-2mhh-w6q8-5hxw
- Warn: Project is vulnerable to: GHSA-6663-c963-2gqg
- Warn: Project is vulnerable to: GHSA-5v72-xg48-5rpm
- Warn: Project is vulnerable to: GHSA-776f-qx25-q3cc
- Warn: Project is vulnerable to: GHSA-72mh-269x-7mh5
- Warn: Project is vulnerable to: GHSA-h4j5-c7cj-74xg
Score
2.1
/10
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