fix(ui,types): Add Metadata form for collection (#11300)
**What** - Adds missing Metadata form for collections - Fixes type of metadata in update payload - Fixes an issue where deleting the last row of a metadata form would prevent adding new ones. Resolves SUP-784
This commit is contained in:
committed by
GitHub
parent
4be327819f
commit
6db96c80d0
@@ -113,6 +113,15 @@ const InnerForm = <TRes,>({
|
||||
|
||||
function deleteRow(index: number) {
|
||||
remove(index)
|
||||
|
||||
// If the last row is deleted, add a new blank row
|
||||
if (fields.length === 1) {
|
||||
insert(0, {
|
||||
key: "",
|
||||
value: "",
|
||||
disabled: false,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
function insertRow(index: number, position: "above" | "below") {
|
||||
|
||||
Reference in New Issue
Block a user