2.4.2 • Published 2 years ago

react-native-swimlane v2.4.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

react-native-swimlane

Prototype for kanban style table style with sections

Installation

npm install react-native-swimlane

Usage

import { Swimlane, Column, Section, KanbanItem } from 'react-native-swimlane';

// ...

<Swimlane<{ value: string }>
   columns={data.columns}
   sections={data.sections}
   data={data.items}
   emptyItem={() => {
     return (
       <View>
         <Text>Empty item</Text>
       </View>
     );
   }}
   renderColumnItem={(column, index) => (
     <View key={index}>
       <Text>{column.title}</Text>
     </View>
   )}
   renderSectionHeader={(section) => {
     return (
       <View key={section.index}>
         <Text>{section.title}</Text>
       </View>
     );
   }}
   onItemMoved={(from, to, itemBefore, itemAfter) => {
     console.log(from, to, itemBefore, itemAfter);
   }}
   renderItem={(info, column, section, row) => {
     return info ? (
       <View>
         <Text>
           {column}-{section}-{row}
         </Text>
         <Text>{info.data.value}</Text>
       </View>
     ) : null;
   }}
   columnContentStyle={{ marginHorizontal: 13 }}
   draggingAreaStyle={() => ({
     width: 100,
     height: 100,
     backgroundColor: 'green',
     bottom: 10,
     right: 10,
   })}
   enterCursorOffset={{ x: 40, y: 20 }}
 />

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

2.3.0

2 years ago

2.4.1

2 years ago

2.3.2

2 years ago

2.4.0

2 years ago

2.3.1

2 years ago

2.4.2

2 years ago

2.2.1

3 years ago

2.1.2

3 years ago

2.2.0

3 years ago

2.1.3

3 years ago

2.1.0

3 years ago

2.0.0

3 years ago

1.2.0

3 years ago

1.1.5

3 years ago

1.2.3

3 years ago

1.1.4

3 years ago

1.2.2

3 years ago

1.1.3

3 years ago

1.2.1

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.2

3 years ago