mirror of
https://github.com/tooot-app/app
synced 2025-04-03 21:21:01 +02:00
Fix multiple choice poll
This commit is contained in:
parent
c7cc3f1f27
commit
140a30b58c
@ -212,11 +212,19 @@ const TimelinePoll: React.FC<Props> = ({
|
||||
allOptions.map((o, i) => (i === index ? !o : o))
|
||||
)
|
||||
} else {
|
||||
setAllOptions(
|
||||
allOptions.map((o, i) =>
|
||||
i === index ? !allOptions[index] : allOptions[index]
|
||||
{
|
||||
const otherOptions =
|
||||
allOptions[index] === false ? false : undefined
|
||||
setAllOptions(
|
||||
allOptions.map((o, i) =>
|
||||
i === index
|
||||
? !o
|
||||
: otherOptions !== undefined
|
||||
? otherOptions
|
||||
: o
|
||||
)
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}}
|
||||
>
|
||||
|
Loading…
x
Reference in New Issue
Block a user