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

react-filter-control

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-filter-control

[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/komarovalexander/react-filter-control/blob/master/LICENSE) [![Build Status](https://travis-ci.com/komarovalexander/react-filter-control.svg?branch=master)](https://t

  • 2.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
49
decreased by-40.96%
Maintainers
1
Weekly downloads
 
Created
Source

GitHub license Build Status Coverage Status

React Filter Control

The React component for building the composite filter criteria

Demo

Overview

Filter Control

Installation

npm

npm install react-filter-control

yarn

yarn add react-filter-control

Usage

A basic example

import React from "react";
import ReactDOM from "react-dom";
import FilterControl from "react-filter-control";
import { fields, filterValue } from "./data.js";

const handleFilterValueChange = filterValue => {
  // ...
};

const App = () => {
  return (
    <FilterControl
      filterValue={filterValue}
      fields={fields}
      onFilterValueChanged={handleFilterValueChange}
    />
  );
};

ReactDOM.render(<App />, document.querySelector("#root"));

Open Example in CodeSandbox

API

FilterControl

Properties

NameTypeDescription
fieldsArray.<Field>The fields settings
filterValueFilterValueThe filterValue settings
groupsArray.<Group>The groups settings
onFilterValueChangedeventThe filter value changed handler

FilterValue : Object

Properties

NameTypeDescription
groupNamestringGroup name
itemsArray.<(FilterValueGroup|FilterValueItem)>Items in group

FilterValueGroup : Object

Properties

NameTypeDescription
keykeyItem key
groupNamestringGroup name
itemsArray.<(FilterValueGroup|FilterValueItem)>Items in group

FilterValueItem : Object

Properties

NameTypeDescription
keykeyItem key
fieldstringField
operatorstringOperator
valueanyValue

Field : Object

Properties

NameTypeDescription
namestringField name
captionstringField caption
operatorsArray.<Operator>Field operators

Group : Object

Properties

NameTypeDescription
namestringGroup name
captionstringGroup caption

Operator : Object

Properties

NameTypeDescription
namestringOperator name
captionstringOperator caption

License

This project is licensed under the terms of the MIT license.

FAQs

Package last updated on 23 Oct 2019

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