Open Drwna opened 1 year ago
@jajugoguma when executing the createDraggable RowInfo function, it seems that the index calcuation of paginted rows is not taken into account. I'm curious about your thoughts on prevent dragging or index calculations when applying pagination.
export function createDraggableRowInfo(store: Store, posInfo: PosInfo): DraggableRowInfo | null {
const { data, dimension } = store;
const { rawData, filters } = data;
// if there is any filter condition, cannot drag the row
if (!rawData.length || filters?.length) {
return null;
}
const { offsetLeft, offsetTop, index } = getMovedPosAndIndexOfRow(store, posInfo);
const { rowKey, _attributes } = rawData[index];
const row = createFloatingDraggableRow(store, rowKey, offsetLeft, offsetTop, posInfo);
return _attributes.disabled
? null
: {
row,
rowKey,
line: createFloatingLine(dimension.scrollYWidth),
};
}
Describe the bug can’t be dragged row after pagination, can only be dragged on the first page, other pages can't be dragged
Version latest
Example https://codesandbox.io/s/stoic-maxwell-o47co5?file=/src/index.js