This commit is contained in:
Philippe Torrel
2026-10-26 10:10:08 +01:00
parent 778d1f2929
commit f8fc579c6f
12 changed files with 6751 additions and 16 deletions
@@ -15,7 +15,9 @@ const InputPrice = (props) => {
const handleChange = (e) => {
// console.log(`Preis: ${e.target.value}`);
// console.log('RegEx: ', isValidPrice(e.target.value));
setPrice(e.target.value);
let value = Number(e.target.value);
setPrice(value);
};
return (
@@ -29,10 +31,11 @@ const InputPrice = (props) => {
<input
type="number"
name="price"
placeholder="0.00"
placeholder={0.0}
aria-label="Price"
className={`form-control input-price ${!isValidPrice(price) ? 'is-invalid' : 'is-valid'}`}
step="0.01"
className={`form-control input-price
${!isValidPrice(price) ? 'is-invalid' : 'is-valid'}`}
step={0.01}
value={price}
onChange={handleChange}
/>