0.1.22 • Published 3 years ago
empower-affiliate-search v0.1.22
Empower Affiliate Search
A react component that can be used to filter results from a REST API sources.
Installation
Component
npm install empower-affiliate-search
Repository
- Run
npm install
- After successful installation, run
npm start
Initialization
import AffiliateSearch from 'empower-affiliate-search';
Usage
const AFFILIATE_OPTIONS = [
{
"label": "Fruit Name",
"value": "fruit_name",
"type": "string",
},
{
"label": "Status",
"value": "fruit_status",
"type": "multiple",
"categoryOptions": [
{
"label": "Fresh",
"value": "fresh"
},
{
"label": "Rotten",
"value": "rotten"
}
]
},
]
const extractValueFromAffiliate = (val) => {
...Statement
}
The getValue can be bind to a function of your choice to extract the value from the affiliate and shall be triggered upon enter.
<AffiliateSearch
options={AFFILIATE_OPTIONS}
getValue={(val) => extractValueFromAffiliate(val)}
/>
Result Value
The affiliate will produce the following value upon enter. The "AND" object literal represent the string option category while the "OR" represent the select option category.
{
AND: { "fruit_name": "|test|" } ...other string option value,
OR: { "fruit_status": ["fresh"] } ...other select option value
}
Documentation
Developers
Jephunneh Viernes - jephunneh.viernes@empowerteams.io
Changelog:
- 0.1.22 - Security Fix - Fix vulnerability issues in the package
- 0.1.17 - Bug Fix - clearFilter props not working properly
- 0.1.16 - Bug Fix - options props does not update when the value was changed
- 0.1.15 - added isAffiliateDropdown props
0.1.20
3 years ago
0.1.21
3 years ago
0.1.22
3 years ago
0.1.16
3 years ago
0.1.17
3 years ago
0.1.18
3 years ago
0.1.19
3 years ago
0.1.10
3 years ago
0.1.11
3 years ago
0.1.12
3 years ago
0.1.13
3 years ago
0.1.15
3 years ago
0.1.8
3 years ago
0.1.7
3 years ago
0.1.9
3 years ago
0.1.6
3 years ago
0.0.6
3 years ago
0.0.5
3 years ago
0.0.4
3 years ago
0.0.2
3 years ago
0.0.1
3 years ago