Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable4] fix(FilePicker): Only show checkbox skeletons if multiselect was enabled #970

Merged
merged 1 commit into from
Aug 28, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion lib/components/FilePicker/FileList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
</thead>
<tbody>
<template v-if="loading">
<LoadingTableRow v-for="i in [1, 2, 3, 4]" :key="i" />
<LoadingTableRow v-for="i in [1, 2, 3, 4]" :key="i" :show-checkbox="multiselect"/>
</template>
<template v-else>
<FileListRow v-for="file in sortedFiles"
Expand Down
11 changes: 10 additions & 1 deletion lib/components/FilePicker/LoadingTableRow.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- Simple component to fake a loading table row with placeholders -->
<template>
<tr aria-hidden="true" class="file-picker__row loading-row">
<td class="row-checkbox">
<td v-if="showCheckbox" class="row-checkbox">
<span />
</td>
<td class="row-name">
Expand All @@ -16,6 +16,15 @@
</tr>
</template>

<script setup lang="ts">
defineProps<{
/**
* Does the filelist use the checkbox column
*/
showCheckbox: boolean
}>()
</script>

<style scoped lang="scss">
@use './FileList.scss';

Expand Down
Loading