File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,11 +36,11 @@ function Virtual() {
3636 style= {{ height: ' 500px' }}
3737 >
3838 {
39- (record , index , dataKey ) => {
39+ (item , index , dataKey ) => {
4040 return (
4141 < div>
4242 < span className= " .handle" > { index }< / span>
43- { record .text }
43+ { item .text }
4444 < / div>
4545 )
4646 }
@@ -58,6 +58,7 @@ function Virtual() {
5858| --------------- | ---------- | --------------------------------------- |
5959| ` onTop ` | ` Function ` | Scrolling to the top of the scroller |
6060| ` onBottom ` | ` Function ` | Scrolling to the bottom of the scroller |
61+ | ` onScroll ` | ` Function ` | Scroll event |
6162| ` onDrag ` | ` Function ` | Drag is started |
6263| ` onDrop ` | ` Function ` | Drag is complete |
6364| ` onRangeChange ` | ` Function ` | Range of visible items has changed |
@@ -129,7 +130,7 @@ return (
129130 ...
130131 >
131132 {
132- (record ) => < div> { record .text }< / div>
133+ (item ) => < div> { item .text }< / div>
133134 }
134135 < / virtualList>
135136)
Original file line number Diff line number Diff line change @@ -22,14 +22,14 @@ function Virtual() {
2222 className= " virtual-list"
2323 >
2424 {
25- (record , index , dataKey ) => {
25+ (item , index , dataKey ) => {
2626 return (
2727 < div className= " list-item" >
2828 < div className= " item-title" >
29- < span className= " index" > #{ record .index }< / span>
29+ < span className= " index" > #{ item .index }< / span>
3030 < span className= " handle" > ☰< / span>
3131 < / div>
32- < p> { record .desc }< / p>
32+ < p> { item .desc }< / p>
3333 < / div>
3434 )
3535 }
Original file line number Diff line number Diff line change @@ -23,11 +23,11 @@ function Virtual() {
2323 className= " virtual-list flex-1"
2424 >
2525 {
26- (record , index , dataKey ) => {
26+ (item , index , dataKey ) => {
2727 return (
2828 < div className= " list-item" >
2929 < div className= " item-title" >
30- < span className= " index" > #{ record .index }< / span>
30+ < span className= " index" > #{ item .index }< / span>
3131 < span className= " handle" > ☰< / span>
3232 < / div>
3333 < / div>
Original file line number Diff line number Diff line change @@ -24,14 +24,14 @@ function Virtual() {
2424 wrapStyle= {{ display: ' flex' }}
2525 >
2626 {
27- (record , index , dataKey ) => {
27+ (item , index , dataKey ) => {
2828 return (
2929 < div className= " list-item" >
3030 < div className= " item-title" >
31- < span className= " index" > #{ record .index }< / span>
31+ < span className= " index" > #{ item .index }< / span>
3232 < span className= " handle" > ☰< / span>
3333 < / div>
34- < p> { record .desc }< / p>
34+ < p> { item .desc }< / p>
3535 < / div>
3636 )
3737 }
Original file line number Diff line number Diff line change @@ -38,14 +38,14 @@ function Virtual() {
3838 className= " virtual-list"
3939 >
4040 {
41- (record , index , dataKey ) => {
41+ (item , index , dataKey ) => {
4242 return (
4343 < div className= " list-item" >
4444 < div className= " item-title" >
45- < span className= " index" > #{ record .index }< / span>
45+ < span className= " index" > #{ item .index }< / span>
4646 < span className= " handle" > ☰< / span>
4747 < / div>
48- < p> { record .desc }< / p>
48+ < p> { item .desc }< / p>
4949 < / div>
5050 )
5151 }
Original file line number Diff line number Diff line change @@ -22,14 +22,14 @@ function Virtual() {
2222 chosenClass= " chosen"
2323 >
2424 {
25- (record , index , dataKey ) => {
25+ (item , index , dataKey ) => {
2626 return (
2727 < div className= " list-item" >
2828 < div className= " item-title" >
29- < span className= " index" > #{ record .index }< / span>
29+ < span className= " index" > #{ item .index }< / span>
3030 < span className= " handle" > ☰< / span>
3131 < / div>
32- < p> { record .desc }< / p>
32+ < p> { item .desc }< / p>
3333 < / div>
3434 )
3535 }
Original file line number Diff line number Diff line change @@ -60,14 +60,14 @@ function Virtual() {
6060 className= " virtual-list"
6161 >
6262 {
63- (record , index , dataKey ) => {
63+ (item , index , dataKey ) => {
6464 return (
6565 < div className= " list-item" >
6666 < div className= " item-title" >
67- < span className= " index" > #{ record .index }< / span>
67+ < span className= " index" > #{ item .index }< / span>
6868 < span className= " handle" > ☰< / span>
6969 < / div>
70- < p> { record .desc }< / p>
70+ < p> { item .desc }< / p>
7171 < / div>
7272 )
7373 }
Original file line number Diff line number Diff line change @@ -36,15 +36,15 @@ function Virtual() {
3636 className= " virtual-table"
3737 >
3838 {
39- (record , index , dataKey ) => {
39+ (item , index , dataKey ) => {
4040 return (
4141 < tr>
4242 < td>
43- < span className= " index" > #{ record .index }< / span>
43+ < span className= " index" > #{ item .index }< / span>
4444 < span className= " handle" > ☰< / span>
4545 < / td>
46- < td> { record .name }< / td>
47- < td> { record .desc }< / td>
46+ < td> { item .name }< / td>
47+ < td> { item .desc }< / td>
4848 < / tr>
4949 )
5050 }
Original file line number Diff line number Diff line change @@ -36,11 +36,11 @@ function Virtual() {
3636 style = { { height: ' 500px' }}
3737 >
3838 {
39- (record , index , dataKey ) => {
39+ (item , index , dataKey ) => {
4040 return (
4141 <div >
4242 <span className = " .handle" >{ index } </span >
43- { record .text }
43+ { item .text }
4444 </div >
4545 )
4646 }
Original file line number Diff line number Diff line change 11{
22 "name" : " react-virtual-sortable" ,
3- "version" : " 1.1.2 " ,
3+ "version" : " 1.1.3 " ,
44 "description" : " A virtual scrolling list component that can be sorted by dragging" ,
55 "main" : " dist/index.cjs.js" ,
66 "module" : " dist/index.esm.js" ,
3939 },
4040 "homepage" : " https://github.com/mfuu/react-virtual-sortable#readme" ,
4141 "dependencies" : {
42- "sortable-dnd" : " ^0.7.1 "
42+ "sortable-dnd" : " ^0.7.2 "
4343 },
4444 "devDependencies" : {
4545 "@babel/core" : " ^7.16.7" ,
You can’t perform that action at this time.
0 commit comments