@cmds/field-settings
v1.0.0
Published
Used for ordering, showing, hiding fields in a view.
Downloads
3
Readme
FieldSettings
Used for ordering, showing, hiding fields in a view.
Example
<FieldSettings
fields={[{
id: '1',
name: 'Field 1',
visibility: true
}, {
id: '2',
name: 'Field 2',
visibility: true
}, {
id: '3',
name: 'Field 3',
visibility: false
}]}
onSort={({oldIndex, newIndex}) => {
// do something
}}
onShowOrHide={({id, visibility}) => {
// do something
}}
onShowOrHideAll={({visibility}) => {
// do something
}}
/>