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

Dialog User - set default value for tag controls #431

Merged
merged 1 commit into from
Jan 21, 2020
Merged

Dialog User - set default value for tag controls #431

merged 1 commit into from
Jan 21, 2020

Conversation

himdel
Copy link
Contributor

@himdel himdel commented Jan 8, 2020

right now, field.default_value gets initialized to 0 for every DialogFieldTagControl.

What should be happening:

  • single selects:
    <Choose>/<None> gets shown as default
  • multiselects:
    Nothing selected

same as the other dropdowns and multidropdowns.

Thus changing the initialization to set either "" or [] as default_value.

Fixes ManageIQ/manageiq-ui-classic#6392
May depend on ManageIQ/manageiq#19696 and ManageIQ/manageiq#19697

right now, field.default_value gets initialized to 0 for every DialogFieldTagControl.

What should be happening:

- single selects:
  <Choose>/<None> gets shown as default
- multiselects:
  Nothing selected

same as the other dropdowns and multidropdowns.

Thus changing the initialization to set either "" or [] as default_value.
@miq-bot
Copy link
Member

miq-bot commented Jan 8, 2020

Checked commit https://github.com/himdel/ui-components/commit/2a74e2452ad80a64fdfd72655d8569fd84269896 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. 🍰

@himdel himdel closed this Jan 14, 2020
@himdel himdel reopened this Jan 14, 2020
@himdel
Copy link
Contributor Author

himdel commented Jan 14, 2020

(kicking stuck travis; the core dependency is merged now)

@mzazrivec
Copy link
Contributor

We need this in ivanchuk for https://bugzilla.redhat.com/show_bug.cgi?id=1859524 Although this will most likely require an ivanchuk-specific PR, since this probably won't cherry-pick cleanly.

simaishi pushed a commit that referenced this pull request Jul 23, 2020
Dialog User - set default value for tag controls

(cherry picked from commit a47b131)

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

Ivanchuk backport details:

$ git log -1
commit 2d69e1f4776f9e9dfc67fca82a53426cc1f28fde
Author: Milan Zázrivec <mzazrivec@redhat.com>
Date:   Tue Jan 21 17:19:45 2020 +0100

    Merge pull request #431 from himdel/tag-defaultvalue

    Dialog User - set default value for tag controls

    (cherry picked from commit a47b131da5ad6a3de41be1ebb6eb8b1172b0cfb7)

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

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.

Difference between <None> and Nothing selected in dialog user tag control
4 participants