Skip to content

Commit

Permalink
Merge pull request #7084 from skateman/ddf-select-placeholder
Browse files Browse the repository at this point in the history
Globally set the default placeholder for select fields in DDF
  • Loading branch information
himdel authored May 27, 2020
2 parents c5db388 + e9050b8 commit 51f1087
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/javascript/forms/mappers/formFieldsMapper.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import { formFieldsMapper } from '@data-driven-forms/pf3-component-mapper';
import { formFieldsMapper, components } from '@data-driven-forms/pf3-component-mapper';
import { componentTypes } from '@@ddf';

import AsyncCredentials from '../../components/async-credentials/async-credentials';
import AsyncProviderCredentials from '../../components/async-credentials/async-provider-credentials';
Expand All @@ -23,6 +24,7 @@ const fieldsMapper = {
'validate-credentials': AsyncCredentials,
'validate-provider-credentials': AsyncProviderCredentials,
'field-array': FieldArray,
[componentTypes.SELECT]: props => <components.SelectField placeholder={`<${__('Choose')}>`} {...props} />,
};

export default fieldsMapper;

0 comments on commit 51f1087

Please sign in to comment.