Skip to content
Merged
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
8 changes: 4 additions & 4 deletions ui/src/views/infra/network/IpRangesTabGuest.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
:rowKey="record => record.id"
:pagination="false"
>
<template #name="{ text }">
<resource-icon v-if="item.icon" :image="item.icon.base64image" size="1x" style="margin-right: 5px"/>
<template #name="{ text, record }">
<resource-icon v-if="record.icon" :image="record.icon.base64image" size="1x" style="margin-right: 5px"/>
<apartment-outlined v-else style="margin-right: 5px"/>
<router-link :to="{ path: '/guestnetwork/' + item.id }">
<router-link :to="{ path: '/guestnetwork/' + record.id }">
{{ text }}
</router-link>
</template>
Expand Down Expand Up @@ -137,7 +137,7 @@ export default {
this.fetchData()
},
watch: {
network (newItem, oldItem) {
resource (newItem, oldItem) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@davidjumani With Vue3, to watch an Object, you should use deep. Refer: https://vuejs.org/guide/essentials/watchers.html#deep-watchers

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@utchoang Doc says deep is needed only in cases where trying to run callback on all nested mutations. Even there example runs fine without it and I don't think we want to run fetchData here on any property change of resource

if (!newItem || !newItem.id) {
return
}
Expand Down