Skip to content

Commit

Permalink
Merge pull request #91 from opendatalab/fix/tag-form
Browse files Browse the repository at this point in the history
fix(frontend): previous value changed after new item created
  • Loading branch information
johnking0099 authored Feb 14, 2023
2 parents 136c7b7 + 176f087 commit 663bee7
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions apps/frontend/src/utils/tool/editTool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,7 @@ export const addInputList = (
}
newInputList.push(newData);
}
for (let inputListIndex = 0; inputListIndex < inputList.length; inputListIndex++) {
const unit = newInputList[inputListIndex];
if (unit.subSelected && unit.subSelected.length > 0) {
unit.key = unit.subSelected[0].key.split('-')[0];
unit.value = unit.subSelected[0].value.split('-')[0];
}
}

return newInputList;
};

Expand Down

0 comments on commit 663bee7

Please sign in to comment.