Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@paprika/action-bar
Advanced tools
ActionBar
yarn add @paprika/action-bar
or with npm:
npm install @paprika/action-bar
Prop | Type | required | default | Description |
---|---|---|---|---|
children | node | true | - |
Prop | Type | required | default | Description |
---|---|---|---|---|
children | node | true | - | |
orderedColumnIds | arrayOf | true | - | |
onChangeOrder | func | true | - | |
onChangeVisibility | func | true | - | |
onHideAll | func | true | - | |
onShowAll | func | true | - | |
renderTriggerButton | func | false | null |
Prop | Type | required | default | Description |
---|---|---|---|---|
appliedNumber | number | false | 0 | |
children | node | false | null | |
columns | arrayOf | true | - | |
isAddSortDisabled | bool | false | false | |
onAddSort | func | true | - | |
onApply | func | true | - | |
onCancel | func | false | () => {} | |
onClose | func | false | () => {} | |
onOpen | func | false | () => {} |
Action Bar component contains 2 individual widgets.
<Sort />
and <ColumnsArrangement />
> npm install --save @paprika/action-bar
or
> yarn add @paprika/action-bar
<Sort appliedNumber={appliedNumber} columns={columns} onAddSort={onAddSort} onApply={onApply}>
<Sort.Field id={fieldId} onDelete={handleDelete} onChange={handleChange} isFirst />
<Sort.Field id={fieldId} onDelete={handleDelete} onChange={handleChange} isFirst={false} />
</Sort>
You can also use the hook useSort
const { appliedNumber, sortedFields, sortedData, onAddSort, onDeleteSort, onChangeSort, onApply } = useSort({
columns,
});
const handleDelete = fieldId => () => {
onDeleteSort(fieldId);
};
const handleChange = fieldId => params => {
onChangeSort({ ...params, id: fieldId });
};
return (
<Sort appliedNumber={appliedNumber} columns={columns} onAddSort={onAddSort} onApply={onApply}>
{sortedFields.map((field, index) => (
<Sort.Field
key={field.id}
{...field}
onDelete={handleDelete(field.id)}
onChange={handleChange(field.id)}
isFirst={index === 0}
/>
))}
</Sort>
// display sortedData
);
<ColumnsArrangement
columns={orderedColumns}
onChangeOrder={handleChangeOrder}
onHideAll={handleHideAll}
onShowAll={handleShowAll}
onChangeVisibility={handleChangeVisibility}
/>
You can also use the hook useColumnsArrangement
const {
orderedColumnIds,
onChangeVisibility,
onShowAll,
onHideAll,
onChangeOrder,
isColumnHidden,
} = useColumnsArrangement({ defaultOrderedColumnIds });
return (
<ColumnsArrangement
orderedColumnIds={orderedColumnIds}
onChangeOrder={onChangeOrder}
onHideAll={onHideAll}
onShowAll={onShowAll}
onChangeVisibility={onChangeVisibility}
>
<ColumnsArrangement.ColumnDefinition
id="columnId"
label="Column label"
isDisabled={false}
isHidden={isColumnHidden("columnId")}
/>
</ColumnsArrangement>
);
FAQs
ActionBar
We found that @paprika/action-bar demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.