Skip to content

Commit 4e95686

Browse files
committed
Fix: properly bind the disabled prop
The disabled prop is incorrectly passed without a value. In ReScript, boolean props need to be explicitly set.
1 parent b531492 commit 4e95686

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

client/app/bundles/comments/rescript/CommentForm/forms/HorizontalForm.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@react.component
22
let make = (~author, ~handleAuthorChange, ~text, ~handleTextChange, ~handleSubmit, ~disabled) => {
3-
<form className="form-horizontal flex flex-col gap-4" onSubmit=handleSubmit disabled aria-label="Comment submission form">
3+
<form className="form-horizontal flex flex-col gap-4" onSubmit=handleSubmit disabled={disabled} aria-label="Comment submission form">
44
<div className="flex flex-col gap-0 items-center lg:gap-4 lg:flex-row">
55
<label htmlFor="comment_author" className="w-full lg:w-2/12 lg:text-end shrink-0"> {"Name"->React.string} </label>
66
<input

client/app/bundles/comments/rescript/CommentForm/forms/InlineForm.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ let make = (~author, ~handleAuthorChange, ~text, ~handleTextChange, ~handleSubmi
33
<form
44
className="form-inline flex flex-col lg:flex-row flex-wrap gap-4"
55
onSubmit=handleSubmit
6-
disabled
6+
disabled={disabled}
77
aria-label="Comment submission form">
88
<div className="flex gap-2 items-center">
99
<label> htmlFor="comment_author" {"Name"->React.string} </label>

client/app/bundles/comments/rescript/CommentForm/forms/StackedFrom.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@react.component
22
let make = (~author, ~handleAuthorChange, ~text, ~handleTextChange, ~handleSubmit, ~disabled) => {
3-
<form onSubmit=handleSubmit disabled className="flex flex-col gap-4" aria-label="Comment submission form">
3+
<form onSubmit=handleSubmit disabled={disabled} className="flex flex-col gap-4" aria-label="Comment submission form">
44
<div className="flex flex-col gap-0">
55
<label htmlFor="comment_author" className="w-full"> {"Name"->React.string} </label>
66
<input

0 commit comments

Comments
 (0)