renaming bug
This commit is contained in:
parent
6bd23c0609
commit
27b07f2451
|
@ -93,7 +93,13 @@ export const getBackendUiStore = () => {
|
|||
saveField: ({ originalName, field }) => {
|
||||
store.update(state => {
|
||||
// delete the original if renaming
|
||||
if (originalName) {
|
||||
delete state.draftModel.schema[originalName]
|
||||
state.draftModel._rename = {
|
||||
old: originalName,
|
||||
updated: field.name,
|
||||
}
|
||||
}
|
||||
|
||||
state.draftModel.schema[field.name] = cloneDeep(field)
|
||||
|
||||
|
|
|
@ -45,9 +45,9 @@
|
|||
$: sort = $backendUiStore.sort
|
||||
$: sorted = sort ? fsort(data)[sort.direction](sort.column) : data
|
||||
|
||||
$: headers = Object.keys($backendUiStore.selectedModel.schema).filter(
|
||||
id => !INTERNAL_HEADERS.includes(id)
|
||||
)
|
||||
$: headers = Object.keys($backendUiStore.selectedModel.schema)
|
||||
.sort()
|
||||
.filter(id => !INTERNAL_HEADERS.includes(id))
|
||||
|
||||
$: schema = $backendUiStore.selectedModel.schema
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue