Skip to content

Commit

Permalink
Removed <client-only> wrapper from <Datatable>s because the upgrade t…
Browse files Browse the repository at this point in the history
…o PrimeVue 3.51.0 fixed the problem it was masking.
  • Loading branch information
rizen committed Apr 10, 2024
1 parent c349b77 commit 73a5f89
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 53 deletions.
1 change: 1 addition & 0 deletions docs/change-log.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ outline: deep
* Implemented: add --bare as an option in generators that gets rid of the boiler plate #75
* Implemented: cli improvements #83
* Implemented: document the ving structure #84
* Removed <client-only> wrapper from <Datatable>s because the upgrade to PrimeVue 3.51.0 fixed the problem it was masking.

## 2024-04-08
* Breaking change: Refactored VingRecord isOwner(), canEdit(), and propsOptions() to be async.
Expand Down
46 changes: 22 additions & 24 deletions pages/user/admin/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,28 @@
<Button label="Search" @click="users.search()" />
</InputGroup>

<client-only>
<DataTable :value="users.records" stripedRows @sort="users.sortDataTable">
<Column field="props.username" header="Username" sortable></Column>
<Column field="props.realName" header="Real Name" sortable></Column>
<Column field="props.email" header="Email Address" sortable>
<template #body="slotProps">
<a :href="`mailto:${slotProps.data.props.email}`">{{ slotProps.data.props.email }}</a>
</template>
</Column>
<Column field="props.createdAt" header="Created" sortable>
<template #body="slotProps">
{{ dt.formatDateTime(slotProps.data.props.createdAt) }}
</template>
</Column>
<Column header="Manage">
<template #body="slotProps">
<NuxtLink :to="`/user/admin/${slotProps.data.props.id}`" class="mr-2 no-underline">
<Button icon="pi pi-pencil" severity="success" />
</NuxtLink>
<Button icon="pi pi-trash" severity="danger" @click="slotProps.data.delete()" />
</template>
</Column>
</DataTable>
</client-only>
<DataTable :value="users.records" stripedRows @sort="users.sortDataTable">
<Column field="props.username" header="Username" sortable></Column>
<Column field="props.realName" header="Real Name" sortable></Column>
<Column field="props.email" header="Email Address" sortable>
<template #body="slotProps">
<a :href="`mailto:${slotProps.data.props.email}`">{{ slotProps.data.props.email }}</a>
</template>
</Column>
<Column field="props.createdAt" header="Created" sortable>
<template #body="slotProps">
{{ dt.formatDateTime(slotProps.data.props.createdAt) }}
</template>
</Column>
<Column header="Manage">
<template #body="slotProps">
<NuxtLink :to="`/user/admin/${slotProps.data.props.id}`" class="mr-2 no-underline">
<Button icon="pi pi-pencil" severity="success" />
</NuxtLink>
<Button icon="pi pi-trash" severity="danger" @click="slotProps.data.delete()" />
</template>
</Column>
</DataTable>

<Pager :kind="users" />

Expand Down
56 changes: 27 additions & 29 deletions pages/user/settings/apikeys/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,35 +20,33 @@
<Button label="Search" @click="apikeys.search()" />
</InputGroup>

<client-only>
<DataTable :value="apikeys.records" stripedRows
@sort="(event) => apikeys.sortDataTable(event)">
<Column field="props.createdAt" header="Created" sortable>
<template #body="slotProps">
{{ dt.formatDate(slotProps.data.props.createdAt) }}
</template>
</Column>
<Column field="props.name" header="Name" sortable></Column>
<Column field="props.id" header="API Key">
<template #body="slotProps">
<CopyToClipboard :text="slotProps.data.props.id" />
</template>
</Column>
<Column field="props.privateKey" header="Private Key">
<template #body="slotProps">
<CopyToClipboard :text="slotProps.data.props.privateKey" />
</template>
</Column>
<Column header="Manage">
<template #body="slotProps">
<Button icon="pi pi-pencil" class="mr-2" severity="success"
@click="dialog.current = slotProps.data; dialog.visible = true" />
<Button icon="pi pi-trash" severity="danger"
@click=" slotProps.data.delete()" />
</template>
</Column>
</DataTable>
</client-only>
<DataTable :value="apikeys.records" stripedRows
@sort="(event) => apikeys.sortDataTable(event)">
<Column field="props.createdAt" header="Created" sortable>
<template #body="slotProps">
{{ dt.formatDate(slotProps.data.props.createdAt) }}
</template>
</Column>
<Column field="props.name" header="Name" sortable></Column>
<Column field="props.id" header="API Key">
<template #body="slotProps">
<CopyToClipboard :text="slotProps.data.props.id" />
</template>
</Column>
<Column field="props.privateKey" header="Private Key">
<template #body="slotProps">
<CopyToClipboard :text="slotProps.data.props.privateKey" />
</template>
</Column>
<Column header="Manage">
<template #body="slotProps">
<Button icon="pi pi-pencil" class="mr-2" severity="success"
@click="dialog.current = slotProps.data; dialog.visible = true" />
<Button icon="pi pi-trash" severity="danger"
@click=" slotProps.data.delete()" />
</template>
</Column>
</DataTable>

<Pager :kind="apikeys" />

Expand Down

0 comments on commit 73a5f89

Please sign in to comment.