Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@synerise/ds-operators
Advanced tools
Operators UI Component
npm i @synerise/ds-operators
or
yarn add @synerise/ds-operators
import Operators from '@synerise/ds-operators'
<Operators
texts={{
buttonLabel: 'Choose',
searchPlaceholder: 'Search',
noResults: 'No results',
}}
onChange={(item) => {}}
value={{
'id': 'NUMBER_ONEEQUAL',
'value': 'NUMBER_ONEEQUAL',
'logic': 'EQUAL',
'name': 'Equal',
'groupId': 'NUMBER_ONE',
'group': 'NUMBER_ONE',
'icon': <HashM />,
}}
items={[ {
'id': 'NUMBER_ONEEQUAL',
'value': 'NUMBER_ONEEQUAL',
'logic': 'EQUAL',
'name': 'Equal',
'groupId': 'NUMBER_ONE',
'group': 'NUMBER_ONE',
'icon': <HashM />,
},
{
'id': 'DATE_ONEMORE',
'value': 'DATE_ONEMORE',
'logic': 'MORE',
'name': 'More than',
'groupId': 'DATE_ONE',
'group': 'DATE_ONE',
'icon': <CalendarM />,
'groupName': 'Date',
}]}
groups={[{
'id': 'DATE_ONE',
'name': 'Date',
'itemsType': null,
'tooltip': 'Date',
'icon': <CalendarM />,
'defaultGroup': true,
}, {
'id': 'NUMBER_ONE',
'name': 'Number',
'itemsType': null,
'tooltip': 'Number',
'icon': <HashM />,
'defaultGroup': false,
}]}
/>
Property | Description | Type | Default |
---|---|---|---|
error | error validation | boolean | - |
getPopupContainerOverride | Popup container function for child tooltips and dropdowns | (trigger: HTMLElement \ null) => HTMLElement; | - |
groups | Groups of operators | OperatorsGroup[] | [] |
items | Array of operators | OperatorsItem[] | [] |
onActivate | Callback called when user opens dropdown | (fieldType: string) => void | - |
onChange | Callback called when user selects operator | (item: OperatorsItem \ OperatorsGroup \ undefined) => void | - |
onDeactivate | Callback called when user closes dropdown | () => void | - |
opened | Whether if dropdown should opens from outside of component | boolean | false |
texts | Translations object | OperatorTexts | - |
value | Selected operator | OperatorsItem \ undefined | undefined |
Property | Description | Type | Default |
---|---|---|---|
defaultGroup | Whether if this group is default | boolean | false |
icon | Icon of group | React.ReactNode | - |
id | Id of group | React.ReactText | - |
itemType | Type of items | string | - |
name | Name of group | string | - |
subGroups | Subgroups of groups | OperatorsGroup[] | - |
tooltip | Tooltip text | string | - |
Property | Description | Type | Default |
---|---|---|---|
group | Group of item | string | - |
groupId | Id of group | React.ReactText | - |
groupName | Name of group | string | - |
icon | Icon of operator | React.ReactNode | - |
id | Id of item | React.ReactText | - |
logic | Logic of operator | string | - |
name | Name of operator | string | - |
subGroups | Subgroups of operator | OperatorsGroup[] | - |
value? | Value of operator | string | - |
Property | Description | Type | Default |
---|---|---|---|
buttonLabel | Button label | 'Choose' | |
noResults | No results info | 'No results' | |
searchPlaceholder | Search box placeholder | 'Search' |
FAQs
Operators UI Component for the Synerise Design System
We found that @synerise/ds-operators demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.