MCPcopy Create free account
hub / github.com/FlowiseAI/Flowise / handleDragEnd

Function handleDragEnd

packages/ui/src/views/datasets/DatasetItems.jsx:117–132  ·  view source on GitHub ↗
(e, position)

Source from the content-addressed store, hash-verified

115 }
116
117 const handleDragEnd = (e, position) => {
118 dragOverItem.current = position
119 const updatedDataset = { ...dataset }
120 updatedDataset.rows.splice(endDragPos, 0, dataset.rows.splice(startDragPos, 1)[0])
121 setDataset({ ...updatedDataset })
122 e.preventDefault()
123 const updatedRows = []
124
125 dataset.rows.map((item, index) => {
126 updatedRows.push({
127 id: item.id,
128 sequenceNo: index
129 })
130 })
131 reorderDatasetRowApi.request({ datasetId: datasetId, rows: updatedRows })
132 }
133
134 const onSelectAllClick = (event) => {
135 if (event.target.checked) {

Callers 1

EvalDatasetRowsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected