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 for dynamic dialog fields not being updated #381

Merged
merged 2 commits into from Apr 10, 2019

Conversation

romanblanco
Copy link
Member

Using dialogField.value for fields that are not a subclass of DialogFieldSortedItem.

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

@miq-bot
Copy link
Member

miq-bot commented Apr 10, 2019

Checked commits romanblanco/ui-components@633df92~...fefaf0c with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
0 files checked, 0 offenses detected
Everything looks fine. 🏆

@romanblanco
Copy link
Member Author

@d-m-u or @eclarizio, could you verify the fix works?

@romanblanco
Copy link
Member Author

@miq-bot add_label bug, hammer/yes

Copy link
Contributor

@d-m-u d-m-u left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, looks great

@h-kataria
Copy link
Contributor

@himdel @martinpovolny can you please merge this PR

Copy link
Member

@eclarizio eclarizio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine overall, surprised the small change in logic didn't break any specs though, I guess we don't have specs covering the changesHappened method for when the field type is DialogFieldRadioButton?

@martinpovolny martinpovolny merged commit a9c4a08 into ManageIQ:master Apr 10, 2019
@martinpovolny martinpovolny self-assigned this Apr 10, 2019
@martinpovolny martinpovolny added this to the Sprint 109 Ending Apr 15, 2019 milestone Apr 10, 2019
simaishi pushed a commit that referenced this pull request Apr 10, 2019
Fix for dynamic dialog fields not being updated

(cherry picked from commit a9c4a08)

https://bugzilla.redhat.com/show_bug.cgi?id=1698586
@simaishi
Copy link

Hammer backport details:

$ git log -1
commit 7bca0ba748ef1cb0ad73d80b2ab143ca71b57ae6
Author: Martin Povolny <mpovolny@redhat.com>
Date:   Wed Apr 10 18:52:25 2019 +0200

    Merge pull request #381 from romanblanco/bz1696474
    
    Fix for dynamic dialog fields not being updated
    
    (cherry picked from commit a9c4a08d4856dcde41839260f2db91fddee74777)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1698586

@d-m-u
Copy link
Contributor

d-m-u commented Apr 11, 2019

Can we change

const fieldValue = (value ? value : field.default_value);
to use the value rather than the default_value?

@himdel
Copy link
Contributor

himdel commented Apr 11, 2019

@d-m-u So, something like..

const fieldValue = (value !== undefined) ? value :
  ((field.values !== undefined) ? field.values : field.default_value);

?

EDIT: values

@h-kataria
Copy link
Contributor

@romanblanco cc

eclarizio added a commit to eclarizio/ui-components that referenced this pull request Apr 11, 2019
himdel added a commit that referenced this pull request Apr 11, 2019
himdel added a commit that referenced this pull request Apr 12, 2019
Revert ng-model changes from #381

(cherry picked from commit 7c13a67)
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

8 participants