Closed himdel closed 5 years ago
@eclarizio @romanblanco if you can, please review :) :eyes:
@miq-bot remove_label wip
Tests should be green too now
Hammer backport details:
$ git log -1
commit eb52db0dafec141001fe3779bdbdb47a6411c8f0
Author: Harpreet Kataria <hkataria@redhat.com>
Date: Mon Jul 8 14:09:44 2019 -0400
Merge pull request #399 from himdel/validate-bz1720245
Dialog User - stable validation, consistent refresh and initial load
(cherry picked from commit 55f80b8dd014cb08b239d300ac698de6361cd128)
https://bugzilla.redhat.com/show_bug.cgi?id=1727989
https://bugzilla.redhat.com/show_bug.cgi?id=1727990
This changes how dialog user does field init & validation:
server updates from inital load and from subsequent refreshes go through a
initField
function (which callssetupField
), allowing for consistent data format transformations on loaddialog field no longer transforms values - previously we would validate multiselects as an array, then join the array to push to dialog user, then validate the same field, with the joined string instead of an array - any transformation needs to happen when saving
dateField & timeField are no longer a thing outside dialogField - on change, we save the value to default_value, so it can be validated and pushed outside like everything else; incorporates changes from https://github.com/ManageIQ/ui-components/pull/398
makes refresh code use the same path, and correctly call
initField
for new values(later TODO - maybe
setupField
should not even be used byDialogField
, always relying oninitField
)(later TODO - we should only
initField
once, thensetupField
can just do straighforward server format to client format conversion)Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1720245 Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1693294 Fixes #396 Closes #398