ui icon indicating copy to clipboard operation
ui copied to clipboard

fix : select component when empty value is passed

Open VikasN37 opened this issue 8 months ago • 1 comments

#7247 Handled empty value in SelectItem component:

  • If props.value is an empty string (""), it is now replaced with a unique placeholder "no_user_input_for_value" when spreading props into SelectPrimitive.Item.

Why:

  • Prevents issues caused by empty values in the select component.
  • Ensures consistency and avoids potential crashes or unexpected behaviors when no value is provided.
  • The placeholder string is unique enough (no_user_input_for_value) to avoid collisions with real user inputs.

VikasN37 avatar Apr 26 '25 11:04 VikasN37

@VikasN37 is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Apr 26 '25 11:04 vercel[bot]