Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cp-select

Package Overview
Dependencies
Maintainers
5
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cp-select

A consistently styled cross-browser select component

  • 1.5.24
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
increased by66.67%
Maintainers
5
Weekly downloads
 
Created
Source

cp-select

A consistently styled cross-browser and keyboard friendly select component

Requirements

  • Angular 1.3
  • Lodash
  • jQuery

Installation

  1. Install through npm npm install --save cp-select
  2. Make sure your angular app depends upon 'cp-select':
angular.module('app', ['cp-select']);

Usage

Markup:

<cp-select ng-model="model" collection="collection"></cp-select>
scope.model = {
	value: "Arizona",
	key: "AZ"
};

scope.collection = [{
	"value": "Alabama",
	"key": "AL"
}, {
	"value": "Alaska",
	"key": "AK"
}, {
	"value": "American Samoa",
	"key": "AS"
}, {
	"value": "Arizona",
	"key": "AZ"
}, {
	"value": "Arkansas",
	"key": "AR"
}];

// The collection object can also be an array of strings
scope.collection = [
	"Alabama",
	"Alaska",
	"American Samoa",
	"Arizona",
	"Arkansas",
];

Options

  • key-model: Make the selected model to be only the key attribute of the selected item
  • transparent
  • append-text
  • autosize-input: Make styling match autosize inputs
  • allow-clear: show an 'x' icon next to selected value, allowing the user to clear the input

Demo

http://canopytax.github.io/cp-select/

FAQs

Package last updated on 20 Nov 2018

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc