Skip to content

Commit dacf7dc

Browse files
authored
Merge pull request #211 from crynobone/patch-1
fix: Edit button on `ResourceTableRow` doesn't work with many-to-many resource
2 parents 905a164 + c59b64a commit dacf7dc

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

resources/js/components/ResourceTableRow.vue

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,16 @@ export default {
363363
...mapGetters(['currentUser']),
364364
365365
updateURL() {
366+
if (this.viaManyToMany) {
367+
return this.$url(
368+
`/resources/${this.viaResource}/${this.viaResourceId}/edit-attached/${this.resourceName}/${this.resource.id.value}`,
369+
{
370+
viaRelationship: this.viaRelationship,
371+
viaPivotId: this.resource.id.pivotValue,
372+
}
373+
)
374+
}
375+
366376
return this.$url(
367377
`/resources/${this.resourceName}/${this.resource.id.value}/edit`,
368378
{

0 commit comments

Comments
 (0)