You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I also include the DraggableRow implementation of my code example here for completeness:
import{flexRender}from'@tanstack/solid-table';import{createSortable,useDragDropContext,transformStyle,}from'@thisbeyond/solid-dnd';// Row Component shown when row is draggedconstDraggableRow=({ row, className }: {row: any;className?: string})=>{constsortable=createSortable(row.original.id);constcontext=useDragDropContext();conststate=context&&context[0];return(<trref={sortable.ref}class={className}style={transformStyle(sortable.transform)}classList={{'opacity-25': sortable.isActiveDraggable,'transition-transform': !!state?.active.overlay,}}>{row.getVisibleCells().map((cell: any,idx: number)=>cell.column.id=='drag-handle' ? (// Only the Drag handle should allow the row to be dragged.<td{...sortable.dragActivators}class="border border-border"style={{height: '1px',width: cell.column.getSize()+'px'}}>{flexRender(cell.column.columnDef.cell,cell.getContext())}</td>) : (<tdclass="border border-border"style={{height: '1px',width: cell.column.getSize()+'px'}}>{flexRender(cell.column.columnDef.cell,cell.getContext())}</td>))}</tr>);};exportdefaultDraggableRow;
Hello,
Thanks for this great library!
I'm trying to implement the Row DnD example for React for the SolidJS version.
Below my current implementation can be found. Feedback always welcome!
Code can be found on StackBlitz.
I also include the DraggableRow implementation of my code example here for completeness: