JSPM

@kassaila/filter-dom-url

0.5.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q37970F
  • License MIT

Filtering data with input, select & URL (URLSearchParams)

Package Exports

  • @kassaila/filter-dom-url

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@kassaila/filter-dom-url) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Filtering data with < input >, < select > & URLSearchParams

Make easy way for filtering data with URLSearchParams & different types of inputs, selects.

npm

release license requests

Build Status Quality Gate Status

Example

A simple demo of usage filter-dom-url

See the code of an example - HTML, JS

Overview

Supported DOM elements types

For tag input:

<input type="..."> - ['checkbox', 'radio', 'color', 'range', 'date', 'month', 'week', 'time']

For tag select:

<select> & <select multiple>

HTML structure

Minimal structure for filter-dom-url initializing:

<form data-filter-form="form-example">
  <input value="value-example" data-filter="type-example" type="checkbox">
</form>

Install

Install package from npm and import:

import Filter from '@kassaila/filter-dom-url';

or copy file or file.min to your project and import:

import Filter from 'dist/filter-dom-url';

Usage

Create Filter instance and initialize:

const filterExample = new Filter({
  formAttr: 'data-filter-form="form-example"',
  filterAttr: 'data-filter',
});

filterExample.init();