diff options
author | Phil Hughes <me@iamphill.com> | 2017-11-06 11:53:33 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-11-06 13:52:04 +0300 |
commit | eacd821a3c0bae80a56a6933d5ab6aea4b9f283e (patch) | |
tree | a8a1ddf44d0b2b840ceb9a855ee0fc3a6c1c5187 /app/assets/javascripts/repo | |
parent | e2bcb3a46fd7d29bcbd17101e9a4e8f7d0ca4746 (diff) |
moved key into data structure
uses an array of classes to render skeleton loading cells
Diffstat (limited to 'app/assets/javascripts/repo')
-rw-r--r-- | app/assets/javascripts/repo/components/repo_file.vue | 2 | ||||
-rw-r--r-- | app/assets/javascripts/repo/components/repo_sidebar.vue | 2 | ||||
-rw-r--r-- | app/assets/javascripts/repo/stores/utils.js | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/app/assets/javascripts/repo/components/repo_file.vue b/app/assets/javascripts/repo/components/repo_file.vue index e7a40e06da7..9f16e6bb2cc 100644 --- a/app/assets/javascripts/repo/components/repo_file.vue +++ b/app/assets/javascripts/repo/components/repo_file.vue @@ -39,7 +39,7 @@ return this.file.id.substr(0, 8); }, submoduleColSpan() { - return !this.isCollapsed && this.isSubmodule ? 3 : undefined; + return !this.isCollapsed && this.isSubmodule ? 3 : 1; }, }, methods: { diff --git a/app/assets/javascripts/repo/components/repo_sidebar.vue b/app/assets/javascripts/repo/components/repo_sidebar.vue index 8efc1aaa06c..3f61d048288 100644 --- a/app/assets/javascripts/repo/components/repo_sidebar.vue +++ b/app/assets/javascripts/repo/components/repo_sidebar.vue @@ -80,7 +80,7 @@ export default { /> <repo-file v-for="(file, index) in treeList" - :key="file.name + file.type" + :key="file.key" :file="file" /> </tbody> diff --git a/app/assets/javascripts/repo/stores/utils.js b/app/assets/javascripts/repo/stores/utils.js index 57c0dd62c41..fae1f4439a9 100644 --- a/app/assets/javascripts/repo/stores/utils.js +++ b/app/assets/javascripts/repo/stores/utils.js @@ -1,5 +1,6 @@ export const dataStructure = () => ({ id: '', + key: '', type: '', name: '', url: '', @@ -55,6 +56,7 @@ export const decorateData = (entity) => { return { ...dataStructure(), id, + key: `${name}-${type}-${id}`, type, name, url, |