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

Hello there! I have encountered the following issue: :sob: @Mosh

    defaultValue={issue.assignedToUserId || ""}
          <SelectValue placeholder="Unassigned" />
           <SelectItem value="">Unassigned</SelectItem>
              {users?.map((user) => (

For some reason it argues because of the empty string here <SelectItem value="">Unassigned</SelectItem>. I am using schadcn/ui, which is build on top of RadixUI so I decided to give it a go, so far this is the only issue, if someone could help me please to cope with it?

Hi I think I solved the problem.

  1. onValueChange: when assigning a value to assignedToUserId, make a condition: assignedToUserId: userId === “unassigned” ? null : userId,

  2. <Select.Item value=“unassigned”>Unassigned</Select.Item>
    So by default, assignedToUserId = “unassigned”, and when we choose a user, it get
    the userId.

Hope it helps. It woks on my computer😉


Thank you. It’s indeed solved the issue. However in the next sections of the course: We will encounter the problem with filtering the statuses, at this point this trick is not going to work I suppose. So I thought there is a reason why some people get such an error :smiling_face_with_tear: :smiling_face_with_tear: :smiling_face_with_tear:

Work here to solve filter problem:

import { Status } from '@prisma/client'
import { Select } from '@radix-ui/themes'
import { useRouter } from 'next/navigation'

const statuses: { label: string; value?: Status }[] = [
  { label: 'All' },
  { label: 'Open', value: 'OPEN' },
  { label: 'In Progress', value: 'IN_PROGRESS' },
  { label: 'Closed', value: 'CLOSED' },

const IssueStatusFilter = () => {
  const router = useRouter()

  return (
      onValueChange={(status) => {
        const query = status === 'ALL' ? '' : `?status=${status}`
      <Select.Trigger placeholder='Filter by status...' />
        {statuses.map((status) => (
            value={status.value ?? 'ALL'}

export default IssueStatusFilter


Thank you for the solution. I would suggest you may need to update defaultValue={issue.assignedToUserId || "unassigned"} to show “Unassigned” as default

For those who are interested to follow the course, if you pay good attention, Mosh installed @radix-ui/themes**@1.1.2**, that will resolve the problem. For some reason the maintainer had updated the radix-ui/theme package.


change the version of "@radix-ui/themes":"^1.1.2" in package.json and then run npm install
do this because u face same issue multiple times

1 Like
  1. add a new line with useState before IsLoading statement
    const [assigneeField, setAssigneeField] = useState(issue.assignedToUserId || ‘Unassigned’)

  2. Change Select.Root to
    onValueChange={async (userId) => {
    await axios.patch(/api/issues/${issue.id}, {
    assignedToUserId: userId === ‘Unassigned’ ? null : userId,

  3. Change the Unassigned Select.Item field to
    <Select.Item value=“Unassigned”>Unassigned</Select.Item>

This is useful for those who do not want to downgrade the Radix UI since ^2.0.0 is a major update.

Thank you very much. This solved my issue. :grinning:

Here is i have found some solution using the latest version of redix UI

const handleValueChange = (userId : any) => {
        axios.patch(`/api/issues/${issue.id}`, { assignToUserId: userId === 'unassign' ? null : userId })


    return (
        <Select.Root onValueChange={handleValueChange}>
            <Select.Trigger placeholder='Assign ...' />


                    <Select.Item value="unassign">Unassign</Select.Item>
                    {users?.map((user) => {
                        return (
                            <Select.Item key={user.id} value={user.id}>{user.name}</Select.Item>