1.0.0 • Published 8 years ago
@cmds/field-settings
Licence
MIT
Version
1.0.0
Deps
1
Size
803 kB
Vulns
0
Weekly
0
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
}}
/>
