Skip to content

Commit c8309d3

Browse files
authored
Merge pull request #409 from data-driven-forms/builder-integration
Builder integration
2 parents 6c7e8c3 + 7ae6139 commit c8309d3

File tree

6 files changed

+21
-6
lines changed

6 files changed

+21
-6
lines changed

packages/common/src/select/index.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import CreatableSelect from 'react-select/creatable';
66
import PropTypes from 'prop-types';
77
import clsx from 'clsx';
88
import isEqual from 'lodash/isEqual';
9-
import { input } from '../prop-types-templates';
109
import fnToString from '../utils/fn-to-string';
1110
import reducer from './reducer';
1211
import useIsMounted from '../hooks/use-is-mounted';
@@ -169,7 +168,15 @@ Select.propTypes = {
169168
value: PropTypes.any,
170169
placeholder: PropTypes.string,
171170
loadOptionsChangeCounter: PropTypes.number,
172-
...input
171+
isDisabled: PropTypes.bool,
172+
isReadOnly: PropTypes.bool,
173+
loadOptions: PropTypes.func,
174+
loadingMessage: PropTypes.node,
175+
loadingProps: PropTypes.object,
176+
selectVariant: PropTypes.string,
177+
updatingMessage: PropTypes.node,
178+
noOptionsMessage: PropTypes.node,
179+
isSearchable: PropTypes.bool
173180
};
174181

175182
Select.defaultProps = {

packages/mui-component-mapper/src/files/select.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,5 @@ Select.defaultProps = {
5252
};
5353

5454
export default Select;
55+
56+
export const InternalSelect = MUISelect;

packages/mui-component-mapper/src/files/select/integration-select.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ Option.propTypes = {
158158
*/
159159
innerProps: PropTypes.shape({
160160
id: PropTypes.string.isRequired,
161-
key: PropTypes.string.isRequired,
161+
key: PropTypes.string,
162162
onClick: PropTypes.func.isRequired,
163163
onMouseMove: PropTypes.func.isRequired,
164164
onMouseOver: PropTypes.func.isRequired,
@@ -173,7 +173,7 @@ Option.propTypes = {
173173
PropTypes.shape({
174174
current: PropTypes.any.isRequired
175175
})
176-
]).isRequired,
176+
]),
177177
/**
178178
* Whether the option is focused.
179179
*/
@@ -221,7 +221,7 @@ SingleValue.propTypes = {
221221
/**
222222
* Props passed to the wrapping element for the group.
223223
*/
224-
innerProps: PropTypes.any.isRequired,
224+
innerProps: PropTypes.any,
225225
selectProps: PropTypes.object.isRequired
226226
};
227227

packages/pf3-component-mapper/src/files/select.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,5 @@ Select.propTypes = {
4242
};
4343

4444
export default Select;
45+
46+
export const InternalSelect = DataDrivenSelect;

packages/pf4-component-mapper/src/files/select.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,5 @@ Select.propTypes = {
3333
};
3434

3535
export default Select;
36+
37+
export const InternalSelect = DataDrivenSelect;

packages/react-form-renderer/src/files/use-field-api.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,13 @@ const useFieldApi = ({ name, initializeOnMount, component, render, validate, dat
4949
});
5050
}
5151

52+
const { initialValue, ...cleanProps } = props;
53+
5254
/**
5355
* construct component props necessary that would live in field provider
5456
*/
5557
return {
56-
...props,
58+
...cleanProps,
5759
...overrideProps,
5860
...fieldProps,
5961
input: {

0 commit comments

Comments
 (0)