Skip to content
Snippets Groups Projects
Commit 6e64e4f7 authored by Marc Hanisch's avatar Marc Hanisch
Browse files

fixes issue that device copy was not always available

parent 669c308a
No related branches found
No related tags found
2 merge requests!90Draft: restructure frontend properties 2,!82Restructure frontend
......@@ -49,7 +49,7 @@
</template>
<script lang="ts">
import { Component, Vue, Prop } from 'nuxt-property-decorator'
import { Component, Vue, Prop, Watch } from 'nuxt-property-decorator'
import DeviceBasicDataForm from '@/components/DeviceBasicDataForm.vue'
......@@ -101,5 +101,11 @@ export default class DeviceEditBasicPage extends Vue {
get isLoggedIn () {
return this.$store.getters['oidc/isAuthenticated']
}
@Watch('value', { immediate: true, deep: true })
// @ts-ignore
onDeviceChanged (val: Device) {
this.deviceCopy = Device.createFromObject(val)
}
}
</script>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment