Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
ng-select2-component
Advanced tools
[![npm version](https://badge.fury.io/js/ng-select2-component.svg)](https://badge.fury.io/js/ng-select2-component) [![Downloads](https://img.shields.io/npm/dm/ng-select2-component.svg)](https://www.npmjs.com/package/ng-select2-component) [![GitHub license
This Angular CLI module it's a fork of select2-component without Vue & React. For Vue or React, please use the original component.
npm i ng-select2-component --save
import { Select2Module } from "ng-select2-component";
@NgModule({
imports: [BrowserModule, FormsModule, Select2Module],
declarations: [MainComponent],
bootstrap: [MainComponent],
})
class MainModule { }
<select2 [data]="data"
[value]="value"
(update)="update($event)">
</select2>
name | type | description |
---|---|---|
data | Select2Data | the data of the select2 |
value | Select2Value? | initial value |
disabled | boolean? | whether the component is disabled |
minCountForSearch | number? = 6 | hide search box if options.length < minCountForSearch |
placeholder | string? | the placeholder string if nothing selected |
customSearchEnabled | boolean? | will trigger search event, and disable inside filter |
multiple | boolean? | select multiple options |
material | "" or true | enable material style |
editPattern | (str: string) => string | use it for change the pattern of the filter search |
ngModel/id/required/disabled/readonly/tabIndex | just like a select control | |
update | (value: Select2UpdateValue) => void | triggered when user select an option |
open | () => void | triggered when user open the options |
search | (text: string) => void | triggered when search text changed |
type Select2Data = (Select2Group | Select2Option)[];
interface Select2Group = {
label: string;
options: Select2Option[];
classes?: string;
};
interface Select2Option = {
value: Select2Value;
label: string;
disabled?: boolean;
component?: string | Function; // the component
classes?: string;
};
type Select2Value = string | number | boolean;
type Select2UpdateValue = Select2Value | Select2Value[];
ng build ng-select2-component --prod
cp *.md dist/ng-select2-component
cd dist/ng-select2-component
npm publish
Like Angular, this module is released under the permissive MIT license. Your contributions are always welcome.
V7.0.0 (2018-12-05)
<select2-label>
tagFAQs
An Angular select2 component.
The npm package ng-select2-component receives a total of 5,046 weekly downloads. As such, ng-select2-component popularity was classified as popular.
We found that ng-select2-component demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.