mirror of
https://github.com/formbricks/formbricks.git
synced 2026-01-07 16:21:57 -06:00
fix: other option not working in multiSelect multi question (#2607)
This commit is contained in:
committed by
GitHub
parent
c282f630c4
commit
3c91dd52a0
@@ -227,10 +227,9 @@ export const MultipleChoiceMultiQuestion = ({
|
||||
value={getLocalizedValue(otherOption.label, languageCode)}
|
||||
className="border-brand text-brand h-4 w-4 border focus:ring-0 focus:ring-offset-0"
|
||||
aria-labelledby={`${otherOption.id}-label`}
|
||||
onChange={(e) => {
|
||||
onChange={() => {
|
||||
setOtherSelected(!otherSelected);
|
||||
if ((e.target as HTMLInputElement)?.checked) {
|
||||
if (!otherValue) return;
|
||||
if (!value.includes(otherValue)) {
|
||||
addItem(otherValue);
|
||||
} else {
|
||||
removeItem(otherValue);
|
||||
|
||||
Reference in New Issue
Block a user