Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix survey dropdown issue by using new version of common #289

Closed
wants to merge 1 commit into from

Conversation

niklasva82
Copy link
Member

@niklasva82 niklasva82 commented May 25, 2023

Resolve #288

Requires zetkin/zetkin-common#58

A potential issue is illustrated below. Even when not changing anything, the survey will be automatically selected. This may be a good thing in some cases, but it also means that all surveys with any select-type questions will be automatically ticked for submission if the survey has been opened.

Screencast.from.2023-05-25.16-53-53.webm

@richardolsson
Copy link
Member

Nice work! I'm commenting here because this is the affected app, even if the change is in zetkin/zetkin-common#58.

I'm wondering if this is the best solution, because of the issue that you've raised here (good work spotting that btw!).

Even when not changing anything, the survey will be automatically selected.

An alternative solution that would not incur this issue would be to add a "null" option to the select box and always display it at the top, with a translated string along the lines of "Pick an option".

That way, the default value (null/undefined) would show that "Pick an option" pseudo-option, forcing the caller to pick a real option, and thereby triggering the default behaviour of saving the survey only once the caller has interacted with it.

What do you think about that?

@niklasva82
Copy link
Member Author

Superseded by #290

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Response to default dropdown selection not registered in survey submission in call interface
2 participants