Git Product home page Git Product logo

ismoak's Introduction

ismoak

iSmoak is an attempt to make have a multiselect select box in a dropdown. Currently it depents on Angular 1.x and UI Bootstrap. Named iSmoak because all the developers at NextGear Capital with so frustrated with the comparable library being used.

How to use

First include the JS libraries (if you dont use wiredep)

<script src="bower_components/angular/angular.min.js"></script>
<script src="bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
<script src="bower_components/lodash/lodash.min.js"></script>
<script src="bower_components/ismoak/ismoak.min.js"></script>

And then the css

<link rel="stylesheet" href="bower_components/ismoak/ismoak.css" />

Then in your module include the module

angular.module('yourApp', ['ismoak']);

And finally in your html

<ismoak-dropdown
  items="{items}"
  options="{options}"
  disabled="{disabled}"
  on-blur="{onBlur}">
</ismoak-dropdown>
Param Description
items List of dropdown items
options Options that override defaults
disabled Expression that determines if input is disabled
onBlur Function that gets called after every selection change

Options

Option Description Default
groupBy Group items by property null
groupsOpen Are the groups open false
orderBy Property items are ordered by 'name'
searchable Is a search box displayed true
displayProp Property of each item used for displaying in list 'name'
maxDisplayed Number of items displayed in input before changing to "X selected" 3
noneMessage Text displayed in input when no items are selected 'None Selected'
allMessage Text displayed in input when all items are selected 'All Selected'
partialMessage Partial message template. Num selected is passed as ${count} param '${count} selected'
labelBuilder When the none, all, and parital message strings dont quite meet your requirements. Function that takes selected items as first parameter and all items as second. Must return a string to be used as label. null
selectAllBtnText Text displayed in select all button 'Select All'
selectNoneBtnText Text displayed in select none button 'Select None'
searchNoResultsText Text displayed when no items are returned with search 'No items matching your search query.'

ismoak's People

Contributors

smoakey avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.