WarUI

Currency Editor

GRID-A14-F06P1beyond-baselinePlanned

Edits money values using a currency code, minor-unit precision and a locale-formatted display. It accepts plain digits while editing and shows the formatted amount afterwards. An option stores amounts as integer minor units to avoid floating-point errors.

Planned. This page shows the specification from issue #193. The live example, source for every framework and the API reference replace it when the feature ships.

Live example

An invoice grid with mixed currencies. Each row has its own currency code (USD, EUR, JPY).

Expected behavior

The editor shows the currency symbol as a prefix and accepts numeric input. The commit rounds to the currency's minor units (JPY has 0 decimals and EUR has 2). The stored value is a decimal or an integer in minor units, depending on the toggle.

Planned API surface

editor: 'currency'editorParams.currencyeditorParams.currencyFieldeditorParams.storeAsMinorUnitseditorParams.localeeditorParams.allowNegative

Acceptance criteria

  • Precision follows ISO 4217 minor units for each currency. (pending)
  • With storeAsMinorUnits, the stored value is an integer. (pending)
  • A per-row currency from currencyField is applied while editing and while displaying. (pending)
  • Negative input is rejected when allowNegative is false. (pending)
  • Pasting '$1,234.56' parses to 1234.56. (pending)