mirror of
https://github.com/formbricks/formbricks.git
synced 2025-12-30 02:10:12 -06:00
Enter event in option
This commit is contained in:
@@ -139,7 +139,6 @@ export default function MultipleChoiceSingleQuestion({
|
||||
onKeyDown={(e) => {
|
||||
if (e.key == "Enter") {
|
||||
setOtherSelected(!otherSelected);
|
||||
onChange({ [question.id]: "" });
|
||||
}
|
||||
}}>
|
||||
<span className="flex items-center text-sm">
|
||||
@@ -179,6 +178,11 @@ export default function MultipleChoiceSingleQuestion({
|
||||
removeItem(otherValue);
|
||||
addItem(e.currentTarget.value);
|
||||
}}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key == "Enter") {
|
||||
onSubmit({ [question.id]: value });
|
||||
}
|
||||
}}
|
||||
placeholder="Please specify"
|
||||
className="mt-3 flex h-10 w-full rounded-md border border-slate-300 bg-transparent bg-white px-3 py-2 text-sm text-slate-800 placeholder:text-slate-400 focus:outline-none focus:ring-2 focus:ring-slate-400 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:border-slate-500 dark:text-slate-300"
|
||||
required={question.required}
|
||||
|
||||
Reference in New Issue
Block a user