Fix archive field reactivity for new collection #17862
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Description
Currently
archiveField
is hardcoded to'status'
, even after we edit the status field name before saving the new collection:directus/app/src/modules/settings/routes/data-model/new-collection.vue
Line 387 in 9526b4e
This causes the archive field to be saved incorrectly even when we changed the default
'status'
name to something else:chrome_oC04oATSg9.mp4
The
TypeError: Cannot read properties of undefined (reading 'type')
error itself is being addressed in #17802, so this PR only ensures the archive field name is actually depending on the status field name, similar to the solution used for sort field:directus/app/src/modules/settings/routes/data-model/new-collection.vue
Line 404 in 9526b4e
Fixes ENG-833
Result
chrome_LEr6RiBcoe.mp4
Type of Change
Requirements Checklist
If adding a new feature: