# AssigneeSelect component in the ISSUE TRACKER is getting a runtime error

**URL:** <https://forum.codewithmosh.com/t/assigneeselect-component-in-the-issue-tracker-is-getting-a-runtime-error/28867>\
**Category:** Next.js\
**Created:** [September 21, 2024, 7:13am UTC](https://forum.codewithmosh.com/t/assigneeselect-component-in-the-issue-tracker-is-getting-a-runtime-error/28867 "2024-09-21T07:13:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![danielu35](https://avatars.discourse-cdn.com/v4/letter/d/e8c25b/32.png) [@danielu35](https://forum.codewithmosh.com/u/danielu35)\
**Post date:** [September 21, 2024, 7:13am UTC](https://forum.codewithmosh.com/t/assigneeselect-component-in-the-issue-tracker-is-getting-a-runtime-error/28867/1 "2024-09-21T07:13:53Z")

</div>

Hey everyone. I have tried a lot of things to try and make this work but on my code I have a \<Select.Item /\> that needs to have a value prop and i am getting a run time error saying: Error: A \<Select.Item /\> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.  
When @Mosh coded this out he just leaves an empty string like the following: `<Select.Item value="">Unassigned</Select.Item>`  
and its supposed to go to this:  
`<Select.Root defaultValue={issue?.assignedToUserId || ""} onValueChange={(userId) => { axios.patch("/api/issues/" + issue.id, { assignedToUserId: userId || null, }); }} >`

I get the run time error i shared first. But even if i fill it in with a space, letter, period or anything, it does not do that || (or) null like mosh has it. I keep hitting the validation errors in my API … i guess i at least know those work.

If any of you have encountered this issue, or may have a solution or want to get together on line and see if we could solve it, i would appreciate it. I was thinking of showing this off to a second round of interviews im going to have in the next two weeks.

Thanks for the support guys!

---

<div class="post-metadata">

**Author:** ![danielu35](https://avatars.discourse-cdn.com/v4/letter/d/e8c25b/32.png) [@danielu35](https://forum.codewithmosh.com/u/danielu35)\
**Post date:** [September 21, 2024, 9:04pm UTC](https://forum.codewithmosh.com/t/assigneeselect-component-in-the-issue-tracker-is-getting-a-runtime-error/28867/2 "2024-09-21T21:04:18Z")

</div>

I figured this out last night after i posted it … The solution was so simple, and I can’t believe i did not think of it earlier. I used a ternary operator. So, my solution is different than @Mosh but on my machine I’m not getting that run time error I was getting prior.

 ![Screenshot 2024-09-21 at 1.58.04 PM](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/a/acf6a2a249eb378380749578b12fe79c493ca063.png)
