mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-08 00:02:15 +01:00
fix type errors
This commit is contained in:
@@ -97,7 +97,7 @@ async function onToggleButtonPress(newState: boolean) {
|
||||
}
|
||||
}
|
||||
|
||||
const currentProject = ref<Project | null>(null);
|
||||
const currentProject = ref<Project>();
|
||||
watch(currentProject, () => {
|
||||
if (currentProject.value) {
|
||||
currentTimeEntry.value.project_id = currentProject.value.id;
|
||||
|
||||
@@ -20,8 +20,8 @@ import { getRandomColor } from '@/utils/color';
|
||||
|
||||
const searchValue = ref('');
|
||||
const searchInput = ref<HTMLElement | null>(null);
|
||||
const model = defineModel<Project | null>({
|
||||
default: null,
|
||||
const model = defineModel<Project>({
|
||||
default: undefined,
|
||||
});
|
||||
const open = ref(false);
|
||||
const projectsStore = useProjectsStore();
|
||||
@@ -63,6 +63,7 @@ async function addProjectIfNoneExists() {
|
||||
watch(open, (isOpen) => {
|
||||
if (isOpen) {
|
||||
nextTick(() => {
|
||||
// @ts-expect-error We need to access the actual HTML Element to focus as radix-vue does not support any other way right now
|
||||
searchInput.value?.$el?.focus();
|
||||
});
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@ function updateValue(e: string[]) {
|
||||
<ComboboxRoot
|
||||
multiple
|
||||
:open="open"
|
||||
@update:modelValue="updateValue"
|
||||
@update:modelValue="updateValue as any"
|
||||
v-model:searchTerm="searchValue"
|
||||
class="relative">
|
||||
<ComboboxAnchor>
|
||||
|
||||
Reference in New Issue
Block a user