Skip to content

Commit 0a107ea

Browse files
committed
Updated propTypes and rearranged FormSelect component
1 parent fb971d2 commit 0a107ea

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

src/components/feed-sources/feed-source-form.jsx

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -64,20 +64,21 @@ function FeedSourceForm({
6464
value={feedSource.description}
6565
onChange={handleInput}
6666
/>
67-
<FormSelect
68-
label={t("feed-source-feed-type-label")}
69-
name="feedType"
70-
value={feedSource.feedType}
71-
onChange={handleInput}
72-
options={feedSourceTypeOptions}
73-
/>
7467
<FormInputArea
7568
name="supportedFeedOutputType"
7669
type="text"
7770
label={t("feed-source-supported-feed-output-type-label")}
7871
value={feedSource.supportedFeedOutputType}
7972
onChange={handleInput}
8073
/>
74+
<FormSelect
75+
label={t("feed-source-feed-type-label")}
76+
name="feedType"
77+
value={feedSource.feedType}
78+
onChange={handleInput}
79+
options={feedSourceTypeOptions}
80+
/>
81+
8182
{dynamicFormElement}
8283
</ContentBody>
8384
<ContentFooter>
@@ -118,15 +119,18 @@ FeedSourceForm.propTypes = {
118119
headerText: PropTypes.string.isRequired,
119120
isLoading: PropTypes.bool,
120121
loadingMessage: PropTypes.string,
121-
dynamicFormElement: PropTypes.node,
122+
dynamicFormElement: PropTypes.oneOfType([
123+
PropTypes.element,
124+
PropTypes.arrayOf(PropTypes.element)
125+
]),
122126
feedSourceTypeOptions: PropTypes.arrayOf(
123127
PropTypes.shape({
124-
value: PropTypes.string,
128+
value: PropTypes.string.isRequired,
125129
title: PropTypes.string,
126-
key: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
127-
template: PropTypes.node,
130+
key: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
131+
template: PropTypes.element,
128132
})
129-
),
133+
).isRequired,
130134
};
131135

132136
export default FeedSourceForm;

0 commit comments

Comments
 (0)