Copilot commented on code in PR #11197:
URL: https://github.com/apache/cloudstack/pull/11197#discussion_r2226259821
##########
ui/src/views/project/AccountsTab.vue:
##########
@@ -157,24 +157,14 @@ export default {
this.fetchData()
},
inject: ['parentFetchData'],
- watch: {
- resource: {
- deep: true,
- handler (newItem) {
- if (!newItem || !newItem.id) {
- return
- }
- this.fetchData()
- }
- }
- },
methods: {
fetchData () {
const params = {}
params.projectId = this.resource.id
params.page = this.page
params.pageSize = this.pageSize
this.updateProjectApi = this.$store.getters.apis.updateProject
+ if (!this.resource.id) return
Review Comment:
Consider setting loading to false before returning to maintain consistent
loading state when resource.id is null, similar to how it should be handled in
ProjectRoleTab.
```suggestion
if (!this.resource.id) {
this.loading.table = false
return
}
```
##########
ui/src/views/project/iam/ProjectRoleTab.vue:
##########
@@ -192,6 +181,7 @@ export default {
},
fetchData () {
this.loading = true
+ if (!this.resource.id) return
Review Comment:
Consider setting loading to false before returning to maintain consistent
loading state when resource.id is null.
```suggestion
if (!this.resource.id) {
this.loading = false
return
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]