Skip to content

Commit

Permalink
fix bug with different fields
Browse files Browse the repository at this point in the history
  • Loading branch information
fabian-bizfactory committed Oct 23, 2023
1 parent b508019 commit e7c4772
Showing 1 changed file with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -290,12 +290,17 @@ const FormConceptGroup = (props: Props) => {

// rowPrefixField is a special property that is only used in an edge case form,
// for a detailed explanation see the comment in the dropBetween function
if (isMovedObject(item) && props.rowPrefixFieldname) {
newValue[props.rowPrefixFieldname] =
// @ts-ignore
props.value[item.dragContext.movedFromAndIdx][
props.rowPrefixFieldname
];
if (isMovedObject(item)) {
const { movedFromFieldName, movedFromAndIdx } = item.dragContext;

if (
movedFromFieldName === props.fieldName &&
props.rowPrefixFieldname
) {
newValue[props.rowPrefixFieldname] =
// @ts-ignore
props.value[movedFromAndIdx][props.rowPrefixFieldname];
}
}

const concept = isMovedObject(item)
Expand Down

0 comments on commit e7c4772

Please sign in to comment.