v0.4.2 — Qty input fix (production)
Bug fix
Qty field no longer resets on every digit in the installed app (production build).
v0.4.1 fixed the issue in dev mode but not in the production binary. The real root cause was @base-ui/react/input (the InputPrimitive used by every Input component) resetting its display value whenever its parent re-renders — even without a controlled value= prop. This does not surface in Vite dev mode but is reproducible in the compiled Tauri binary.
What changed in v0.4.2
GoodsRow previously held three useWatch subscriptions (qty, price, currentTotal) that caused it to re-render on every keystroke, re-rendering its inputs and triggering the Base UI reset.
- Removed all three subscriptions and the
useEffectthat computed the total - Total is now computed inside
register'sonChangeoption (fires after RHF's store update, sogetValuesalready holds the new value) - Row amount display extracted into a standalone
RowTotalchild component — onlyRowTotalre-renders whentotal_amountchanges;GoodsRowand its inputs are never touched during typing
Unchanged
- Footer totals, Zod validation, submit payload, PDF/Excel exports
- All other invoice fields and backend logic