react-data-multi-filter
Advanced tools
Comparing version 0.5.4 to 0.5.6
@@ -7,3 +7,3 @@ { | ||
"typings": "build/index.d.ts", | ||
"version": "0.5.4", | ||
"version": "0.5.6", | ||
"peerDependencies": { | ||
@@ -10,0 +10,0 @@ "react": "^14.0.0 || ^15.0.0 || ^16.0.0" |
@@ -11,3 +11,3 @@ # React Data Multi Filter | ||
This can either be used as a standalone component with render props... | ||
This is a standalone component with render props... | ||
```tsx | ||
@@ -35,3 +35,3 @@ import { DataFilter } from 'react-data-multi-filter'; | ||
``` | ||
...or as a context provider... | ||
...and a context provider... | ||
```tsx | ||
@@ -131,40 +131,28 @@ import { DataFilterContext } from 'react-data-multi-filter'; | ||
filters?: { // Associative array of initial filters | ||
[key: string]: { | ||
(datum: T, idx?: number, data?: T[]): boolean; | ||
[key: string]: any; | ||
}; | ||
[key: string]: (datum: T, idx?: number, data?: T[]): boolean; | ||
}; | ||
children: (props: { // Render props | ||
filteredInData: T[]; // Data included by the filters | ||
filteredOutData: T[]; // Data excluded by the filters | ||
allData: T[]; // Full data set | ||
filters: { // Associative array of all current the filters | ||
[key: string]: { | ||
(datum: T, idx?: number, data?: T[]): boolean; | ||
[key: string]: any; | ||
}; | ||
filteredInData: T[]; // Data included by the filters | ||
filteredOutData: T[]; // Data excluded by the filters | ||
allData: T[]; // Full data set | ||
filters: { // Associative array of all filters | ||
[key: string]: (datum: T, idx?: number, data?: T[]) => boolean; | ||
}; | ||
activeFilters: { // Associative array of all active filters | ||
[key: string]: (datum: T, idx?: number, data?: T[]) => boolean; | ||
}; | ||
addFilters: (filters: { // Add filters dynamically | ||
[key: string]: (datum: T, idx?: number, data?: T[]) => boolean; | ||
}) => void; | ||
removeFilters: (removeKeys: string[]) => void; // Remove filters by key dynamically | ||
filterData: (opts?: { // Function to apply a custom filter set | ||
exclude?: string[]; // Keys of filters to exclude | ||
include?: string[]; // Keys of filters to include | ||
}) => { | ||
filteredInData: T[]; // Data included by the custom filter set | ||
filteredOutData: T[];// Data excluded by the custom filter set | ||
activeFilters: { // Associative array of all active filters | ||
[key: string]: (datum: T, idx?: number, data?: T[]) => boolean; | ||
}; | ||
activeFilters: { // Associative array of all current the filters | ||
[key: string]: { | ||
(datum: T, idx?: number, data?: T[]): boolean; | ||
[key: string]: any; | ||
}; | ||
}; | ||
addFilters: (filters: { // Add filters dynamically | ||
[key: string]: (datum: T, idx?: number, data?: T[]) => boolean; | ||
}) => void; | ||
removeFilters: (removeKeys: string[]) => void; // Remove filters by key dynamically | ||
filterData: (opts?: { // Function to apply a custom filter set | ||
exclude?: string[]; // Keys of filters to exclude | ||
include?: string[]; // Keys of filters to include | ||
}) => { | ||
filteredInData: T[]; // Data included by the custom filter set | ||
filteredOutData: T[];// Data excluded by the custom filter set | ||
activeFilters: { // Filters applied | ||
[key: string]: { | ||
(datum: T, idx?: number, data?: T[]): boolean; | ||
[key: string]: any; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}) => JSX.Element; | ||
@@ -180,6 +168,3 @@ } | ||
filters?: { // Associative array of initial filters | ||
[key: string]: { | ||
(datum: T, idx?: number, data?: T[]): boolean; | ||
[key: string]: any; | ||
}; | ||
[key: string]: (datum: T, idx?: number, data?: T[]) => boolean; | ||
}; | ||
@@ -195,2 +180,3 @@ } | ||
include?: string[]; // Keys of filters to include | ||
filters?: { [key: string]: (datum: T, idx?: number, data?: T[]) => boolean }; // Filters added by this component | ||
children: (props: { // Render Props | ||
@@ -209,3 +195,3 @@ filteredInData: T[]; // Data included by the filters | ||
}) => void; | ||
removeFilter: (removeKeys: string[]) => void; // Remove filters by keys dynamically | ||
removeFilters: (removeKeys: string[]) => void; // Remove filters by keys dynamically | ||
filterData: (opts?: { // Function to apply a custom filter set | ||
@@ -217,3 +203,3 @@ exclude?: string[]; // Keys of filters to exclude | ||
filteredOutData: T[]; // Data excluded by the custom filter set | ||
activeFilters: { | ||
activeFilters: { // Associative array of all active filters | ||
[key: string]: (datum: T, idx?: number, data?: T[]) => boolean; | ||
@@ -220,0 +206,0 @@ }; |
Sorry, the diff of this file is not supported yet
66631
1093
209