feat: refs #7936 improve optionLabel logic in InvoiceInVat component for better handling of numeric values
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Jorge Penadés 2024-12-05 15:59:56 +01:00
parent bd12c3bc66
commit fdd947fbbb
1 changed files with 5 additions and 1 deletions

View File

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