Skip to content

Commit 47b6e66

Browse files
committed
Added mode prop and updated disable condition of feedType form-input
1 parent 1119212 commit 47b6e66

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import FormInput from "../util/forms/form-input";
2626
* @param {object} props.feedSource The feed source object
2727
* @param {object} props.feedSourceTypeOptions The options for feed source types
2828
* @param {element} props.dynamicFormElement The dynamic form element
29+
* @param {string} props.mode The mode
2930
* @returns {object} The feed-source form.
3031
*/
3132
function FeedSourceForm({
@@ -42,7 +43,6 @@ function FeedSourceForm({
4243
const { t } = useTranslation("common", { keyPrefix: "feed-source-form" });
4344
const navigate = useNavigate();
4445

45-
console.log(mode == "edit");
4646
return (
4747
<>
4848
<Form>
@@ -71,7 +71,7 @@ function FeedSourceForm({
7171
name="feedType"
7272
value={feedSource.feedType}
7373
onChange={handleInput}
74-
disabled={(mode === "edit")}
74+
disabled={(mode === "PUT")}
7575
options={feedSourceTypeOptions}
7676
/>
7777

@@ -127,6 +127,7 @@ FeedSourceForm.propTypes = {
127127
template: PropTypes.element,
128128
})
129129
).isRequired,
130+
mode: PropTypes.string,
130131
};
131132

132133
export default FeedSourceForm;

0 commit comments

Comments
 (0)