MCPcopy Index your code
hub / github.com/FlowiseAI/Flowise / handleDeleteItem

Function handleDeleteItem

packages/ui/src/ui-component/array/ArrayRenderer.jsx:164–173  ·  view source on GitHub ↗
(indexToDelete)

Source from the content-addressed store, hash-verified

162
163 // Handler for deleting array items
164 const handleDeleteItem = (indexToDelete) => {
165 const updatedArrayItems = arrayItems.filter((_, i) => i !== indexToDelete)
166 setArrayItems(updatedArrayItems)
167 data.inputs[inputParam.name] = updatedArrayItems
168
169 const updatedItemParameters = itemParameters.filter((_, i) => i !== indexToDelete)
170 setItemParameters(updatedItemParameters)
171
172 updateOutputAnchors(updatedArrayItems, 'DELETE', indexToDelete)
173 }
174
175 const isDeleteButtonVisible = (data.name !== 'conditionAgentflow' && data.name !== 'conditionAgentAgentflow') || arrayItems.length > 1
176

Callers 4

ArrayRendererFunction · 0.85
ConditionBuilderFunction · 0.85
ScenariosInputFunction · 0.85
ArrayInputFunction · 0.85

Calls 1

updateOutputAnchorsFunction · 0.85

Tested by

no test coverage detected