feat: add generic types to multiselect #2618

Open
dpschen wants to merge 1 commits from dpschen/vikunja:feat/multiselect-generic-types into main
Member

This improves (!) the types of Multiselect — it doesn't fix them

This improves (!) the types of Multiselect — it doesn't fix them
dpschen added 1 commit 2024-07-17 16:01:06 +00:00
feat: add generic types to multiselect
Some checks failed
continuous-integration/drone/pr Build is failing
76b5e1a9f2
This improves (!) the types of Multiselect — it doesn't fix them
dpschen force-pushed feat/multiselect-generic-types from 76b5e1a9f2 to 0582cdbd9c 2024-07-17 17:31:47 +00:00 Compare
Member

Hi dpschen!

Thank you for creating a PR!

I've deployed the frontend changes of this PR on a preview environment under this URL: https://2618-feat-multiselect-generic-types--vikunja-frontend-preview.netlify.app

You can use this url to view the changes live and test them out.
You will need to manually connect this to an api running somewhere. The easiest to use is https://try.vikunja.io/.

This preview does not contain any changes made to the api, only the frontend.

Have a nice day!

Beep boop, I'm a bot.

Hi dpschen! Thank you for creating a PR! I've deployed the frontend changes of this PR on a preview environment under this URL: https://2618-feat-multiselect-generic-types--vikunja-frontend-preview.netlify.app You can use this url to view the changes live and test them out. You will need to manually connect this to an api running somewhere. The easiest to use is https://try.vikunja.io/. This preview does not contain any changes made to the api, only the frontend. Have a nice day! > Beep boop, I'm a bot.
dpschen changed title from WIP: feat: add generic types to multiselect to feat: add generic types to multiselect 2024-07-17 20:43:04 +00:00
dpschen requested review from konrad 2024-07-17 20:43:11 +00:00
Author
Member

I want to replace this component with one from radix-vue as fast as possible

I want to replace this component with one from radix-vue as fast as possible
konrad reviewed 2024-07-19 07:36:35 +00:00
@ -221,3 +215,3 @@
const showSearchResults = ref(false)
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const internalValue = ref<string | { [key: string]: any } | any[] | null>(null)
const internalValue = ref<string | T | any[] | null>(null)
Owner

Shouldn't this be T[] as well?

Shouldn't this be `T[]` as well?
Author
Member

Maybe? If you're sure I can replace it.

That would mean that the original type was wrong (should have been { [key: string]: any }[]). I was also confused by the any[]

To be honest I only replaced { [key: string]: any } with T in this PR.

Maybe? If you're sure I can replace it. That would mean that the original type was wrong (should have been `{ [key: string]: any }[]`). I was also confused by the `any[]` To be honest I only replaced `{ [key: string]: any }` with T in this PR.
Owner

It could be that any[] here should be T[] and the single T could stay. I'm not sure, just something I wondered.

It could be that `any[]` here should be `T[]` and the single `T` could stay. I'm not sure, just something I wondered.
Author
Member

I will check it out again and turn my brain on. Maybe I can find it out for real :D

I will check it out again and turn my brain on. Maybe I can find it out for real :D
All checks were successful
continuous-integration/drone/pr Build is passing
Required
Details
This pull request doesn't have enough required approvals yet. 0 of 1 approvals granted from users or teams on the allowlist.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u feat/multiselect-generic-types:dpschen-feat/multiselect-generic-types
git checkout dpschen-feat/multiselect-generic-types
Sign in to join this conversation.
No Reviewers
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: vikunja/vikunja#2618
No description provided.