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

Globally set the default placeholder for select fields in DDF #7084

Merged
merged 1 commit into from
May 27, 2020

Conversation

skateman
Copy link
Member

Found by @himdel in #6698 (comment)

Before:
Screenshot from 2020-05-27 09-20-25

After:
Screenshot from 2020-05-27 09-57-14

@miq-bot
Copy link
Member

miq-bot commented May 27, 2020

Checked commit skateman@e9050b8 with ruby 2.5.7, rubocop 0.69.0, haml-lint 0.28.0, and yamllint
0 files checked, 0 offenses detected
Everything looks fine. 🏆

@himdel himdel merged commit 51f1087 into ManageIQ:master May 27, 2020
@skateman skateman deleted the ddf-select-placeholder branch May 27, 2020 14:56
@simaishi
Copy link
Contributor

@skateman Backporting to jansa conflicts. Please create a PR for jansa branch.

diff --cc app/javascript/forms/mappers/formsFieldsMapper.jsx
index d0073fc7f,d1490920b..000000000
--- a/app/javascript/forms/mappers/formsFieldsMapper.jsx
+++ b/app/javascript/forms/mappers/formsFieldsMapper.jsx
@@@ -1,6 -1,6 +1,11 @@@
  import React from 'react';
++<<<<<<< HEAD:app/javascript/forms/mappers/formsFieldsMapper.jsx
 +import { componentTypes } from '@data-driven-forms/react-form-renderer';
 +import { formFieldsMapper, components } from '@data-driven-forms/pf3-component-mapper';
++=======
+ import { formFieldsMapper, components } from '@data-driven-forms/pf3-component-mapper';
+ import { componentTypes } from '@@ddf';
++>>>>>>> 51f10875d... Merge pull request #7084 from skateman/ddf-select-placeholder:app/javascript/forms/mappers/formFieldsMapper.jsx

  import AsyncCredentials from '../../components/async-credentials/async-credentials';
  import AsyncProviderCredentials from '../../components/async-credentials/async-provider-credentials';
@@@ -22,7 -23,8 +27,12 @@@ const fieldsMapper =
    'password-field': PasswordField,
    'validate-credentials': AsyncCredentials,
    'validate-provider-credentials': AsyncProviderCredentials,
++<<<<<<< HEAD:app/javascript/forms/mappers/formsFieldsMapper.jsx
 +  [componentTypes.SELECT]: props => <components.SelectField classNamePrefix="miq-ddf-select" {...props} />,
++=======
+   'field-array': FieldArray,
+   [componentTypes.SELECT]: props => <components.SelectField placeholder={`<${__('Choose')}>`} {...props} />,
++>>>>>>> 51f10875d... Merge pull request #7084 from skateman/ddf-select-placeholder:app/javascript/forms/mappers/formFieldsMapper.jsx
  };

@simaishi
Copy link
Contributor

Backported to jansa via #7089

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.

5 participants