fix: field property saved to wrong place
This commit is contained in:
parent
91ef114065
commit
2da22416c5
|
@ -40,7 +40,7 @@
|
||||||
]
|
]
|
||||||
let types = ['Many to many (N:N)', 'One to many (1:N)']
|
let types = ['Many to many (N:N)', 'One to many (1:N)']
|
||||||
|
|
||||||
let selectedRelationshipType = 'Many to many (N:N)'
|
let selectedRelationshipType = field.relationshipType
|
||||||
|
|
||||||
let indexes = [...($backendUiStore.selectedTable.indexes || [])]
|
let indexes = [...($backendUiStore.selectedTable.indexes || [])]
|
||||||
let confirmDeleteDialog
|
let confirmDeleteDialog
|
||||||
|
@ -55,12 +55,16 @@
|
||||||
UNEDITABLE_USER_FIELDS.includes(field.name)
|
UNEDITABLE_USER_FIELDS.includes(field.name)
|
||||||
|
|
||||||
async function saveColumn() {
|
async function saveColumn() {
|
||||||
|
// Set relationship type if it's
|
||||||
|
if (field.type === 'link') {
|
||||||
|
field.relationshipType = relationshipTypes.find(type => type.text === selectedRelationshipType).value
|
||||||
|
}
|
||||||
|
|
||||||
backendUiStore.update(state => {
|
backendUiStore.update(state => {
|
||||||
backendUiStore.actions.tables.saveField({
|
backendUiStore.actions.tables.saveField({
|
||||||
originalName,
|
originalName,
|
||||||
field,
|
field,
|
||||||
primaryDisplay,
|
primaryDisplay,
|
||||||
relationshipType: relationshipTypes.find(type => type.text === selectedRelationshipType).value,
|
|
||||||
indexes,
|
indexes,
|
||||||
})
|
})
|
||||||
return state
|
return state
|
||||||
|
|
Loading…
Reference in New Issue