fix: draggable index didn't worked well sometimes
This commit is contained in:
parent
4cb685b1b4
commit
a24e4e154f
|
@ -610,14 +610,14 @@ export const Main = (props: {}) => {
|
||||||
{group.title === null && group.tracks.length === 0 && (
|
{group.title === null && group.tracks.length === 0 && (
|
||||||
<TableRow style={{ height: '1px' }} />
|
<TableRow style={{ height: '1px' }} />
|
||||||
)}
|
)}
|
||||||
{group.tracks.map(n => (
|
{group.tracks.map((t, tidx) => (
|
||||||
<Draggable
|
<Draggable
|
||||||
draggableId={`${group.index}-${n.index}`}
|
draggableId={`${group.index}-${t.index}`}
|
||||||
key={`${n.index - group.tracks[0].index}`}
|
key={`t-${t.index}`}
|
||||||
index={n.index - group.tracks[0].index}
|
index={tidx}
|
||||||
>
|
>
|
||||||
{(provided: DraggableProvided) =>
|
{(provided: DraggableProvided) =>
|
||||||
getTrackRow(n, group.title !== null, provided)
|
getTrackRow(t, group.title !== null, provided)
|
||||||
}
|
}
|
||||||
</Draggable>
|
</Draggable>
|
||||||
))}
|
))}
|
||||||
|
|
Loading…
Reference in New Issue