Skip to content

Commit

Permalink
Add missing PropTypes, fix invalid prop to fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
jerolimov committed Dec 3, 2020
1 parent cee29a2 commit d9b7828
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ export const DropdownField: React.FC<FieldProps> = ({
uiSchema = {},
}) => {
const { t } = useTranslation();
const { items, title } = getUiOptions(uiSchema);
const { items, title } = getUiOptions(uiSchema) as { items?: object; title?: string };
return (
<Dropdown
id={idSchema.$id}
Expand Down
2 changes: 1 addition & 1 deletion frontend/public/components/routes/create-route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ export const AlternateServicesGroup: React.FC<AlternateServiceEntryGroupProps> =
dropDownClassName="dropdown--full-width"
id={`${index}-alt-service`}
onChange={onServiceChange}
describedby={`${index}-alt-service-help`}
describedBy={`${index}-alt-service-help`}
/>
<div className="help-block" id={`${index}-alt-service-help`}>
<p>Alternate service to route to.</p>
Expand Down
10 changes: 9 additions & 1 deletion frontend/public/components/utils/dropdown.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ class DropDownRow extends React.PureComponent {
}
}

/** @augments {React.Component<any>} */
class Dropdown_ extends DropdownMixin {
constructor(props) {
super(props);
Expand Down Expand Up @@ -597,6 +596,15 @@ Dropdown.propTypes = {
textFilter: PropTypes.string,
title: PropTypes.node,
disabled: PropTypes.bool,
id: PropTypes.string,
onChange: PropTypes.func,
selectedKey: PropTypes.string,
titlePrefix: PropTypes.string,
ariaLabel: PropTypes.string,
name: PropTypes.string,
autoSelect: PropTypes.bool,
describedBy: PropTypes.string,
required: PropTypes.bool,
};

class ActionsMenuDropdown_ extends DropdownMixin {
Expand Down

0 comments on commit d9b7828

Please sign in to comment.