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

[WIP] Dialog Editor - reset default_value when changing dropdown type, values, or between single and multiselect #432

Closed
wants to merge 3 commits into from

Conversation

himdel
Copy link
Contributor

@himdel himdel commented Jan 14, 2020

When editing dropdown or tag control properties, changing the value type, single/multi, or the list of tags would not update the chosen defualt_value.

That leads to problems like integer multiselects having a default value of 1 (integer), causing the backend code to blow up trying to iterate over the chosen options.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1746211


wip - fixes the bug, but the reset method should be shared, and should pick the first value sometimes, (and maybe even preserve the original value if it still exists)
and move the watch part of entries change to oninit too
and check out the intent behind the relevant changes from #223
and convertValuesToArray should be merged into this code too

@miq-bot miq-bot removed the wip label Jan 14, 2020
@himdel himdel added the wip label Jan 14, 2020
@himdel himdel changed the title Dialog Editor - reset default_value when changing dropdown type, values, or between single and multiselect [WIP] Dialog Editor - reset default_value when changing dropdown type, values, or between single and multiselect Jan 14, 2020
@miq-bot
Copy link
Member

miq-bot commented Jan 16, 2020

Checked commits https://github.com/himdel/ui-components/compare/b283597888d38610c772907730f730fb261c79cb~...07c9a2fea47f19cf887a94964ff9ba93d27154c3 with ruby 2.5.5, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0
0 files checked, 0 offenses detected
Everything looks fine. 🏆

@miq-bot
Copy link
Member

miq-bot commented Apr 22, 2020

This pull request is not mergeable. Please rebase and repush.

@himdel himdel deleted the bz1746211 branch April 22, 2020 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants