Webanizr Logo
Open / sluit menu
Module filterList

Last change: June 29, 2020

Current version: 1.0.3

The filterList module filters a list and shows / hides elements based on a search query.

syntax

webanizr.collect('filterList', parameters, callback)

parameters

The filterList module accepts the following parameters:

query__selector (required)

The selector to the nodes on which the filtering should be applied.

query__search (required)

The text that is used when filtering. When a node contains the given text, it is shown. If it does not contain the text it is hidden.

callback

This callback function is called for each seperate node. The data contains the node and wether or not it was selected (shown):

{ next__node : node, mode__selected : true or false }

demo

https://cdn.cpmodules.webanizr.com/demo/filter-list/index.html

changelog

  • June 29, 2020: 1.0.3 - HTML tags are no longer matched when filtering
  • January 24, 2020: 1.0.2 - improving the case insensitive matching
  • October 9, 2019: 1.0.1 - support for empy and query strings and case insensitive matching