Skip to content

Commit bdd47bf

Browse files
committed
fix linting error after pf4 downshift migration
1 parent c8a653b commit bdd47bf

File tree

4 files changed

+16
-7
lines changed

4 files changed

+16
-7
lines changed

packages/pf4-component-mapper/src/common/select/input.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ const Input = ({ inputRef, isSearchable, isDisabled, getInputProps, value, ...pr
2828
);
2929
};
3030

31-
Input.propTypes = {};
31+
Input.propTypes = {
32+
inputRef: PropTypes.shape({ current: PropTypes.instanceOf(Element) }),
33+
isSearchable: PropTypes.bool,
34+
isDisabled: PropTypes.bool,
35+
getInputProps: PropTypes.func.isRequired,
36+
value: PropTypes.string
37+
};
3238

3339
export default Input;

packages/pf4-component-mapper/src/common/select/menu.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const getScrollParent = (element) => {
1414
return docEl;
1515
}
1616

17-
for (let parent = element; (parent = parent.parentElement);) {
17+
for (let parent = element; (parent = parent.parentElement);) { // eslint-disable-line
1818
style = getComputedStyle(parent);
1919
if (excludeStaticParent && style.position === 'static') {
2020
continue;

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -206,13 +206,10 @@ InternalSelect.propTypes = {
206206
onInputChange: PropTypes.func,
207207
loadingMessage: PropTypes.node,
208208
menuPortalTarget: PropTypes.any,
209-
menuIsPortal: PropTypes.bool,
209+
menuIsPortal: PropTypes.bool
210210
};
211211

212-
const Select = ({ selectVariant, menuIsPortal, ...props }) => {
213-
const isSearchable = selectVariant === 'createable' || props.isSearchable;
214-
const simpleValue = selectVariant === 'createable' ? false : props.simpleValue;
215-
212+
const Select = ({ menuIsPortal, ...props }) => {
216213
const menuPortalTarget = menuIsPortal ? document.body : undefined;
217214

218215
return <DataDrivenSelect SelectComponent={InternalSelect} menuPortalTarget={menuPortalTarget} menuIsPortal={menuIsPortal} {...props} />;
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
import React from 'react';
2+
import PropTypes from 'prop-types';
23

34
const ValueContainer = ({ value, placeholder }) => {
45
return <span className="pf-c-select__toggle-text">{value || placeholder}</span>;
56
};
67

8+
ValueContainer.propTypes = {
9+
value: PropTypes.node,
10+
placeholder: PropTypes.node
11+
};
12+
713
export default ValueContainer;

0 commit comments

Comments
 (0)