Fix pagination "len" label bug and add description truncation.

- Fix rowsPerPage computed ref not being unwrapped in pagination object
- Add watcher to sync rowsPerPage when route query changes
- Add CSS ellipsis truncation for long repository descriptions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
John Chilton
2025-12-09 16:26:22 -05:00
co-authored by Claude Opus 4.5
parent 258640510d
commit e2fa7959df
@@ -53,7 +53,7 @@ const initialPage = computed(() => {
const pagination = ref({
page: initialPage.value,
rowsNumber: undefined as number | undefined,
rowsPerPage: rowsPerPage,
rowsPerPage: rowsPerPage.value,
})
const INDEX_COLUMN: QTableColumn = {
@@ -145,6 +145,11 @@ watch(
}
)
// Sync rowsPerPage when route query changes
watch(rowsPerPage, (newVal) => {
pagination.value.rowsPerPage = newVal
})
onMounted(() => {
makeRequest()
})
@@ -192,7 +197,7 @@ onMounted(() => {
class="disable-hover-hack"
>
<q-td colspan="100%">
<span class="text-weight-regular q-ml-md text-grey">
<span class="text-weight-regular q-ml-md text-grey description-truncate">
{{ props.row.description }}
</span>
</q-td>
@@ -206,5 +211,13 @@ onMounted(() => {
.disable-hover-hack > td::before {
background: rgba(0, 0, 0, 0) !important;
}
.description-truncate {
display: block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 100%;
}
</style>
<!-- https://codepen.io/smolinari/pen/bGVxKPE -->