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

misojs-select2-component

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

misojs-select2-component

A code mirror component for use in misojs (would probably also work with mithril)

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
increased by400%
Maintainers
1
Weekly downloads
 
Created
Source

misojs-select2-component

A Select2 component for use in misojs

installation

In your main misojs application directory:

npm install misojs-select2-component --save --prefix ./public
cd public/node_modules/misojs-select2-component
npm install .

Usage

You've now installed the component into the /public directory, and you can acceess it in your mvc entities like so:

var Select2 = require('../public/node_modules/misojs-select2-component/select2.component.js')();

In your controller, you might set a value like so:

this.data = [
	{id: 1, name: "John"},
	{id: 2, name: "Mary"},
	{id: 3, name: "Senequia"}
];
this.currentUser = m.prop(this.data[1]);

And in your view:

m('DIV', m.component(Select2, {
	data: ctrl.data, 
	value: ctrl.currentUser
}))

This will render a Select2 component with the users.

Updating

Don't forget to update with the prefix as well, eg, in /public of your misojs app:

npm update misojs-select2-component --prefix ./public

This will update the component.

Keywords

FAQs

Package last updated on 15 Jul 2015

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