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

Difference between <None> and Nothing selected in dialog user tag control #6392

Closed
skateman opened this issue Nov 11, 2019 · 7 comments · Fixed by ManageIQ/ui-components#431

Comments

@skateman
Copy link
Member

The tag control field of the dialog user has both a <None> and a Nothing selected option, which is a little weird. Is this a bug, or a feature? The options has an extra ? value with no label 😕
Screenshot from 2019-11-11 13-04-50

Also I'm not able to reproduce it in the nightly z:
Screenshot from 2019-11-11 13-55-19

@miq-bot add_label question, automation/automate, angular dialogs
@romanblanco, @gmcculloug, @tinaafitz, @himdel

@d-m-u
Copy link
Contributor

d-m-u commented Nov 11, 2019

ManageIQ/ui-components#272 was kinda related to this.

@eclarizio
Copy link
Member

eclarizio commented Nov 11, 2019

@skateman Seems like a bug but odd that it's not reproduceable in the nightly. If the field is required it should say "<Choose>" and if it's not required it should say "<None>" and already be selected. As mentioned in #6393 though, if it's a multiselect, the blank value might show up because the fix for multiselect would be to not include either option (since it doesn't make sense to select both "<None>" and, say, "Chicago"). I think in this case maybe the easiest way to go would be the UI somehow needs to filter out the true "empty" value versus the "<None>"/"<Choose>" values. I guess it depends on how simple it is to get patternfly to do the correct thing.

@skateman
Copy link
Member Author

Yeah, my guess was also that the problem is on the frontend side, because the #values method sends the correct data... cc @himdel

@himdel
Copy link
Contributor

himdel commented Nov 12, 2019

@himdel
Copy link
Contributor

himdel commented Nov 26, 2019

With miq-select for tags (#427),

Tag Single - "Nothing Selected" appears in options and is preselected, instead of <None>
Tag Multi - "Nothing Selected" is preselected (but not in the list) because the control doesn't understand <None>. None is in the list (and shouldn't be).

So this is still an issue...


Looks like in both cases values contains {id: null, name: "<None>",
but default_value is 0, not null (nor [] for multi).

In both cases, default_value coming from server is "".

So, one issue is that <None> should not be present in values for tag multiselect from the server,
the second is that 0 vs null, that's in dialog-user, DialogData#setDefaultValue most likely, looking

@himdel
Copy link
Contributor

himdel commented Jan 8, 2020

OK, with ManageIQ/manageiq#19696, possibly ManageIQ/manageiq#19697 (not sure yet), and definitely ManageIQ/ui-components#431, this should be fixed :) (once merged).

@himdel
Copy link
Contributor

himdel commented Jan 8, 2020

ok

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

Successfully merging a pull request may close this issue.

5 participants