improve typing in solidtime ui package

This commit is contained in:
Gregor Vostrak
2024-10-28 14:54:48 +01:00
parent 27b40d863e
commit e54df74d5d
4 changed files with 18 additions and 11 deletions

View File

@@ -128,6 +128,7 @@ watch(removeAllTags, () => {
selectedTags.value = [];
}
});
type SelectOption = { label: string; value: string };
</script>
<template>
@@ -200,8 +201,12 @@ watch(removeAllTags, () => {
<div class="flex">
<SelectDropdown
v-model="timeEntryBillable"
:get-key-from-item="(item) => item.value"
:get-name-for-item="(item) => item.label"
:get-key-from-item="
(item: SelectOption) => item.value
"
:get-name-for-item="
(item: SelectOption) => item.label
"
:items="[
{
label: 'Keep current billable status',