Issues with inventory system seemingly canceling itself out after drag and drop

First time poster here. Any help would be appreciated.

I have a pretty basic drag and drop inventory system setup that is functional and working, except for when I am dragging an item to a blank slot in the inventory grid.

When the on drop event is fired in my item widget the method im calling basically gets the source and target index’s and inventory components from within the on drop event and I’ve validated that all the data is getting through is coming through correctly.

It saves these as local variables immediately and then sets array elements in both inventories, the source and target, respectively, and then calls to a hud manager component I have in my player controller to refresh the inventory which builds it all again.

It works flawlessly and updates correctly in every scenario unless I’m dragging to a blank slot in the same inventory component. In the cases where I am, the slots visually stay in the same place but I’ve validated the data is carried through correctly and the inventory actually updates it just doesn’t update visually.

It also only does this when I’m setting the new array element and updating both inventory components. If I bypass updating and setting either the source or target the other portion works and updates visually, it’s just when I attempt to do both that neither updates happen.

It seems they are canceling each other out or overriding each other somehow.

DESPITE the fact the system works in pretty much all other scenarios I’ve tested, even across different components etc. If I drag to a slot that is occupied they swap places. And if I check the data that I’m setting array elements with it’s exactly what it’s suppose to be up until I set the second of the two array elements and refresh UI.

It even updates correctly if I’m dragging

Any help would be much appreciated as I am at a loss. If you think you can help but need more info and I can screenshot my blueprint.

Thanks