feat: move from life cycle to data or watcher
- remove from created / mounted - initialize component services in data - use immediate watcher where appropriate - deep watch for route changes
This commit is contained in:

committed by
kolaente

parent
ebeca48be4
commit
f51371bbe0
@ -195,7 +195,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
linkShares: [],
|
||||
linkShareService: LinkShareService,
|
||||
linkShareService: new LinkShareService(),
|
||||
rights: rights,
|
||||
selectedRight: rights.READ,
|
||||
name: '',
|
||||
@ -205,17 +205,10 @@ export default {
|
||||
showNewForm: false,
|
||||
}
|
||||
},
|
||||
beforeMount() {
|
||||
this.linkShareService = new LinkShareService()
|
||||
},
|
||||
created() {
|
||||
this.linkShareService = new LinkShareService()
|
||||
this.load()
|
||||
},
|
||||
watch: {
|
||||
listId() {
|
||||
// watch it
|
||||
this.load()
|
||||
listId: {
|
||||
handler: 'load',
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
computed: mapState({
|
||||
|
Reference in New Issue
Block a user