fix: allow 1 option + other in select question (#6824)

Co-authored-by: Dhruwang <dhruwangjariwala18@gmail.com>
This commit is contained in:
Johannes
2025-11-17 00:39:40 -08:00
committed by GitHub
parent 71a85c7126
commit eedd5200a4

View File

@@ -92,7 +92,7 @@ export const QuestionOptionChoice = ({
const normalChoice = question.choices?.filter((c) => c.id !== "other" && c.id !== "none") || [];
return (
<div className="flex w-full items-center gap-2" ref={setNodeRef} style={style}>
<div className="flex w-full gap-2" ref={setNodeRef} style={style}>
{/* drag handle */}
<div className={cn(isSpecialChoice && "invisible")} {...listeners} {...attributes}>
<GripVerticalIcon className="h-4 w-4 cursor-move text-slate-400" />
@@ -167,7 +167,7 @@ export const QuestionOptionChoice = ({
)}
</div>
<div className="flex gap-2">
{(normalChoice.length > 2 || isSpecialChoice) && (
{(normalChoice.length > 1 || isSpecialChoice) && (
<TooltipRenderer tooltipContent={t("environments.surveys.edit.delete_choice")}>
<Button
variant="secondary"