Skip to content

cagosto/filter-search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Filter Search

Filter down a list by searching using an ES6 class that can be extended to fit your needs. Basic example here.

How to use

First import the class to be used.

import FILTER from 'filter-search';

Then pass it the required arguments for set up. As listed below.

Options Type Require Default Value
holder String true ''
filter String true ''
searchInput String true ''
displayFilter String false null
filterList Array true []
activeKeyClass String false ''
keyboardActive Boolean false false
new FILTER({
  holder: '.filter-scroll',
  filter: '.filter-box',
  searchInput: '#filter-search',
  filterList : [
    "Afghanistan",
    "Albania",
    "Algeria",
    "Andorra",
    "Angola",
    "Anguilla"
  ],
});

About

Filter down a list by search.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published