Description of problem: Version-Release number of selected component (if applicable): Verified in 5.10.2.1.20190318201733_b8aa100 How reproducible: 100% Steps to Reproduce: 1.Add this Method dialog_hash = {1 => 'A', 2 => 'B' ,3 => 'C'} $evm.root['values'] = dialog_hash $evm.log('info', "XXX values: #{dialog_hash}") $evm.root['default_value'] = dialog_hash.keys $evm.log('info', "XXX default value: #{dialog_hash.keys}") exit MIQ_OK 2.Add dialog with set entry point to the newly created instance enable Show Refresh Button enable Load values on init enable Multiselect 3.Create catalog item 4.Order new catalog item Actual results: values doesn't load on a refresh also it doesn't load on init Expected results: It should load values Additional info:
Hi Niyaz, Can you provide a reproducer environment? Thanks, Tina
Tina, This issue is part of this one https://bugzilla.redhat.com/show_bug.cgi?id=1686038#c6 please have a look the comments. Thanks, Niyaz
https://github.com/ManageIQ/ui-components/pull/394
New commit detected on ManageIQ/ui-components/master: https://github.com/ManageIQ/ui-components/commit/93b24358ed433156ca2785a1cc8c744e740a13ae commit 93b24358ed433156ca2785a1cc8c744e740a13ae Author: Martin Hradil <mhradil> AuthorDate: Mon Jun 17 09:32:10 2019 -0400 Commit: Martin Hradil <mhradil> CommitDate: Mon Jun 17 09:32:10 2019 -0400 dialog-user: DialogFieldDropDownList: use ng-options & miq-options <option> can only work with string values, ng-options can handle integers, but omits data-token for searching, ng-options + miq-options should handle both https://bugzilla.redhat.com/show_bug.cgi?id=1693294 src/dialog-user/components/dialog-user/dialogField.html | 22 +- 1 file changed, 8 insertions(+), 14 deletions(-)
(The issue with integer fields was fixed in https://github.com/ManageIQ/ui-components/pull/394, only the issue with reloading multiselects dynamically remains now.)
New commits detected on ManageIQ/ui-components/master: https://github.com/ManageIQ/ui-components/commit/b72bd77fb96d7c2545ea374480951bc9f34919a3 commit b72bd77fb96d7c2545ea374480951bc9f34919a3 Author: Martin Hradil <mhradil> AuthorDate: Mon Jul 8 05:47:25 2019 -0400 Commit: Martin Hradil <mhradil> CommitDate: Mon Jul 8 05:47:25 2019 -0400 DialogUser $onInit - extract field initialization to initField method https://bugzilla.redhat.com/show_bug.cgi?id=1693294 src/dialog-user/components/dialog-user/dialogUser.ts | 41 +- 1 file changed, 22 insertions(+), 19 deletions(-) https://github.com/ManageIQ/ui-components/commit/04716e9fef18b2335dc5f11af13b02abef004d2c commit 04716e9fef18b2335dc5f11af13b02abef004d2c Author: Martin Hradil <mhradil> AuthorDate: Mon Jul 8 05:49:34 2019 -0400 Commit: Martin Hradil <mhradil> CommitDate: Mon Jul 8 05:49:34 2019 -0400 Dialogs - call initField from refreshFieldCallback, JSON.parse in setupField only when string initField needs to be called from refreshFieldCallback so that we don't run the initialization only on initial load, but also on every refresh from server - this makes initial loads and refreshes consistent setupField should only try to parse json multivalues when not already converted Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1693294 src/dialog-user/components/dialog-user/dialogUser.ts | 2 + src/dialog-user/services/dialogData.ts | 4 +- 2 files changed, 5 insertions(+), 1 deletion(-)