mirror of
https://github.com/tooot-app/app
synced 2025-04-04 13:42:00 +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))
|
allOptions.map((o, i) => (i === index ? !o : o))
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
setAllOptions(
|
{
|
||||||
allOptions.map((o, i) =>
|
const otherOptions =
|
||||||
i === index ? !allOptions[index] : allOptions[index]
|
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