0
0
Fork 0

fix(VnTable): orderBy v-model

This commit is contained in:
Alex Moreno 2024-08-16 12:20:08 +02:00
parent 2bea46b601
commit 4b2f4ffac1
2 changed files with 4 additions and 3 deletions

View File

@ -315,7 +315,7 @@ defineExpose({
col?.columnFilter !== false &&
col?.name !== 'tableActions'
"
v-model="orders[col.name]"
v-model="orders[col.orderBy ?? col.name]"
:name="col.orderBy ?? col.name"
:data-key="$attrs['data-key']"
:search-url="searchUrl"
@ -409,7 +409,7 @@ defineExpose({
style="height: 30px"
>
<VnTableOrder
v-model="orders[col.name]"
v-model="orders[col.orderBy ?? col.name]"
:name="col.orderBy ?? col.name"
:label="col?.label"
:data-key="$attrs['data-key']"

View File

@ -50,7 +50,7 @@ const columns = computed(() => [
align: 'left',
label: t('claim.attendedBy'),
name: 'attendedBy',
cardVisible: true,
orderBy: 'workerFk',
columnFilter: {
component: 'select',
attrs: {
@ -63,6 +63,7 @@ const columns = computed(() => [
optionFilter: 'firstName',
},
},
cardVisible: true,
},
{
align: 'left',