feat: refs #7936 simplify optionLabel wip
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Jorge Penadés 2024-12-05 16:41:32 +01:00
parent fdd947fbbb
commit fb1928db7e
1 changed files with 1 additions and 5 deletions

View File

@ -41,11 +41,7 @@ const columns = computed(() => [
options: expenses.value,
model: 'expenseFk',
optionValue: 'id',
optionLabel: (row) => {
if (isNaN(row)) return `${row.id}: ${row.name}`;
let label = expenses.value.find((expense) => expense.id == row);
return `${label.id}: ${label.name}`;
},
optionLabel: (row) => `${row.id}: ${row.name}`,
sortable: true,
align: 'left',
},