searchable-multi

WebJar for searchable-multi

License

License

MIT
Categories

Categories

Search Business Logic Libraries
GroupId

GroupId

org.webjars.bowergithub.matthewp
ArtifactId

ArtifactId

searchable-multi
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

searchable-multi
WebJar for searchable-multi
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/matthewp/searchable-multi

Download searchable-multi

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.bowergithub.matthewp/searchable-multi/ -->
<dependency>
    <groupId>org.webjars.bowergithub.matthewp</groupId>
    <artifactId>searchable-multi</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bowergithub.matthewp/searchable-multi/
implementation 'org.webjars.bowergithub.matthewp:searchable-multi:1.0.0'
// https://jarcasting.com/artifacts/org.webjars.bowergithub.matthewp/searchable-multi/
implementation ("org.webjars.bowergithub.matthewp:searchable-multi:1.0.0")
'org.webjars.bowergithub.matthewp:searchable-multi:jar:1.0.0'
<dependency org="org.webjars.bowergithub.matthewp" name="searchable-multi" rev="1.0.0">
  <artifact name="searchable-multi" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bowergithub.matthewp', module='searchable-multi', version='1.0.0')
)
libraryDependencies += "org.webjars.bowergithub.matthewp" % "searchable-multi" % "1.0.0"
[org.webjars.bowergithub.matthewp/searchable-multi "1.0.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

<searchable-multi>

Published on webcomponents.org npm version

A component that provides a more user-friendly method of doing multi selects.

multi.js is a user-friendly replacement for select boxes with the multiple attribute. It is mobile-friendly, easy to use, and provides search functionality. multi.js is also easy to customize and style with CSS.

Install

Yarn:

yarn add searchable-multi

Bower:

bower install matthewp/searchable-multi --save

Usage

Simply nest a <select multiple> inside of the searchable-multi tag:

<searchable-multi placeholder="Search fruits...">
  <select multiple>
    <option>Apple</option>
    <option>Banana</option>
    <option>Blueberry</option>
    <option>Cherry</option>
    <option>Coconut</option>
    <option>Grapefruit</option>
    <option>Kiwi</option>
    <option>Lemon</option>
    <option>Lime</option>
    <option>Mango</option>
    <option>Orange</option>
    <option>Papaya</option>
  </select>
</searchable-multi>

placeholder

Set the placeholder attribute or property to set the placeholder text used in the search input:

<searchable-multi placeholder="Add items...">
   ...
</searchable-multi>

value

The value property is an array of all of the selected values:

let multi = document.querySeletor('searchable-multi');

console.log(multi.value); // ["Orange", "Kiwi", "Lemon"]

change

The change event fires any time the value changes, such as when an item is selected or unselected.

let multi = document.querySeletor('searchable-multi');

multi.addEventListener('change', e => {
  console.log(multi.value); // ["Cherry"]
});

License

MIT, see the LICENSE file.

Versions

Version
1.0.0