Skip to content

Commit 372bc19

Browse files
fix: disable input fields on Create Invoice #1659
1 parent a13b7ee commit 372bc19

File tree

1 file changed

+31
-29
lines changed

1 file changed

+31
-29
lines changed

src/app/screens/Receive/index.tsx

+31-29
Original file line numberDiff line numberDiff line change
@@ -213,39 +213,41 @@ function Receive() {
213213
createInvoice();
214214
}}
215215
>
216-
<div className="mb-4">
217-
<DualCurrencyField
218-
id="amount"
219-
min={0}
220-
label={t("amount.label")}
221-
placeholder={t("amount.placeholder")}
222-
fiatValue={fiatAmount}
223-
onChange={handleChange}
224-
autoFocus
225-
/>
226-
</div>
227-
228-
<div className="mb-4">
229-
<TextField
230-
id="description"
231-
label={t("description.label")}
232-
placeholder={t("description.placeholder")}
233-
onChange={handleChange}
234-
/>
235-
</div>
216+
<fieldset disabled={loading}>
217+
<div className="mb-4">
218+
<DualCurrencyField
219+
id="amount"
220+
min={0}
221+
label={t("amount.label")}
222+
placeholder={t("amount.placeholder")}
223+
fiatValue={fiatAmount}
224+
onChange={handleChange}
225+
autoFocus
226+
/>
227+
</div>
236228

237-
<div className="text-center mb-4">
238229
<div className="mb-4">
239-
<Button
240-
type="submit"
241-
label={t("actions.create_invoice")}
242-
fullWidth
243-
primary
244-
loading={loading}
245-
disabled={loading}
230+
<TextField
231+
id="description"
232+
label={t("description.label")}
233+
placeholder={t("description.placeholder")}
234+
onChange={handleChange}
246235
/>
247236
</div>
248-
</div>
237+
238+
<div className="text-center mb-4">
239+
<div className="mb-4">
240+
<Button
241+
type="submit"
242+
label={t("actions.create_invoice")}
243+
fullWidth
244+
primary
245+
loading={loading}
246+
disabled={loading}
247+
/>
248+
</div>
249+
</div>
250+
</fieldset>
249251
</form>
250252
)}
251253
</div>

0 commit comments

Comments
 (0)