Skip to content

Commit

Permalink
perf(module-inspector): changes v-for key from id to index (#625)
Browse files Browse the repository at this point in the history
Using the index instead of the ID forces Golden Layout to repaint less as the gl-component isn't
recreated each time. We don't really care if it isn't recreated in this case so it's okay to use
index over ID.
  • Loading branch information
2xAA authored Aug 31, 2021
1 parent 5aeecae commit c79cb81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
<!-- hack around dynamic components not working correctly. CSS below hides tabs with the title "hidden" -->
</gl-component>
<gl-component
v-for="module in focusedModules"
:key="module.$id"
v-for="(module, i) in focusedModules"
:key="i"
:title="`${module.meta.name} properties`"
:closable="false"
ref="moduleInspector"
Expand Down

0 comments on commit c79cb81

Please sign in to comment.