We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b1f21b6 commit 33b82f1Copy full SHA for 33b82f1
packages/grant-explorer/src/features/projects/ViewProject.tsx
@@ -441,10 +441,13 @@ export default function ViewProject() {
441
aria-label={"Donation amount for all projects "}
442
id={"input-donationamount"}
443
min="0"
444
- type="number"
+ type="text"
445
value={directDonationAmount}
446
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
447
- setDirectDonationAmount(e.target.value);
+ const value = e.target.value.replace(",", ".");
448
+ if (/^\d*\.?\d*$/.test(value) || value === "") {
449
+ setDirectDonationAmount(value);
450
+ }
451
}}
452
className="w-16 lg:w-18"
453
/>
0 commit comments