Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#5447·vendure

Dashboard `MoneyInput` rounds to 2 decimals and rewrites the value on blur when `moneyStrategyPrecision` is 3

Author: julian-boeremaCreated Sep 29, 2026Updated Sep 29, 2026

Describe the bug MoneyInput (packages/dashboard/src/lib/components/data-input/money-input.tsx) uses toFixed(2) for the displayed value and on blur, and a 0.01 step, whatever moneyStrategyPrecision is. At precision 3, just focusing and leaving a price field changes the stored amount.

To Reproduce

  1. With moneyStrategyPrecision: 3, a price stored as 275 (0.275) shows as 0.28.
  2. Focus the field and blur it without typing. It calls onChange(280), so saving writes 280.

Expected behavior The field shows and round-trips at moneyStrategyPrecision decimals: 275 shows as 0.275 and stays 275.

Actual behavior The third decimal is rounded away on display, and on blur it is written back as 280.

Environment

  • @vendure/dashboard 3.7.3. The same code is on master.

Source: vendurehq/vendure

View original on GitHubView discussion on GitHub