Skip to content

Commit

Permalink
fix type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregor Vostrak authored and Gregor Vostrak committed Mar 11, 2024
1 parent 2c9106c commit 82186e0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion resources/js/Components/TimeTracker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 3 additions & 2 deletions resources/js/Components/common/ProjectDropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
});
Expand Down
2 changes: 1 addition & 1 deletion resources/js/Components/common/TagDropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 82186e0

Please sign in to comment.