Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions resources/js/components/inputs/relationship/RelationshipInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,16 @@ export default {
itemData(data, olddata) {
if (this.initializing) return;
this.$emit('item-data-updated', data);
},

value(value) {
if (this.initializing || this.loading) return;

// Values set from outside (e.g. from a save response, where a new term's id gets
// normalized) may reference items we have no data for, which would display raw ids.
if (value?.some(selection => !_.find(this.data, (item) => item.id == selection))) {
this.getDataForSelections(value);
}
}

},
Expand Down
Loading