Fix: custom poll not starting in some conditions

This commit is contained in:
Tainan Felipe 2024-03-27 12:02:59 -03:00
parent 3859a7c854
commit 1759d2bc5c

View File

@ -406,7 +406,10 @@ const PollCreationPanel: React.FC<PollCreationPanelProps> = ({
// @ts-ignore - JS component wrapped by intl
icons={false}
defaultChecked={customInput}
onChange={() => setCustomInput(!customInput)}
onChange={() => {
setCustomInput(!customInput);
setType(pollTypes.Custom);
}}
ariaLabel={intl.formatMessage(intlMessages.customInputToggleLabel)}
showToggleLabel={false}
data-test="autoOptioningPollBtn"