New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@warp-works/warpjs-filter-box

Package Overview
Dependencies
Maintainers
4
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@warp-works/warpjs-filter-box

Simple UI filter-box

  • 2.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
4
Created
Source

warpjs-filter-box

Usage

In webpack, add the following folder to the partial directories:

const FilterBox = require('@warp-works/warpjs-filter-box');

...
module: {
  loaders: [
    ...,
    {
      test: /\.hbs$/,
      loader: 'handlebars-loader',
      query: {
        ...
        partialDirs: {
          ...,
          FilterBox.templatesDir,
        }
      }
    }
  ]
}

In your template, you can now use:

<div class="warpjs-filter-box-container">

  <div class="pull-right">
    {{>warpjs-filter-box-template placeholder="Filter my items"}}
  </div>

  <table>
    <tbody>
      <tr class="warpjs-filter-box-item">
        ...
      </tr>
    </tbody>
  </table>
</div>

The filter-box will apply the filtering to items with the class warpjs-filter-box-item in the same warpjs-filter-box-container as the filter box.

Those classes are exported for convenience with:

FilterBox.CONTAINER_CLASS
FilterBox.ITEM_CLASS

This simple implementation will call $(element).text() and compare .val() in lower case.

In your client code, to enable the listeners, all you have to do is:

const FilterBox = require('@warp-works/warpjs-filter-box');

FilterBox.init($);

Keywords

FAQs

Package last updated on 22 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc