AppFlowy-IO / AppFlowy-IO/AppFlowy

[Bug] Number formatting (Currency) corrupts values and forces column format rollback upon losing focus

Aperta
#8,807 0 commenti 0 reazioni 1 assegnatario Rivendicata da @appflowy Vedi su GitHub
Lingua principale
Dart
Stelle
76.6k
Fork
6k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### Bug Description

There is an issue in the database Number property when using Currency formatting (like Euros or Czech Koruna). When a user enters a large integer (e.g., 3000000) into a column formatted as Currency, the application formats it correctly at first. However, as soon as the user navigates to another section and returns, the value is permanently truncated to decimals (e.g., 3.00). Furthermore, trying to fix this by changing the column format back to a plain number fails, as the application forces a rollback to the Currency format upon switching views.

### How to Reproduce

Create a database column with the property type set to Number.

Change the number format to Currency (Euro €).

Type a large round number into a cell (e.g., 3000000 for 3 million) without any spaces or symbols, and hit Enter. The UI initially displays it correctly.

Navigate away from the current view (e.g., switch to another sidebar document or database tab) and then return back to the original view.

Issue 1: The value in the cell is now permanently changed to 3.00. The original input of 3 million is lost.

Change the column format back to "No formatting" (None) or plain Number. The cell instantly displays the correct original value (3000000).

Navigate away from the view once again and return back.

Issue 2: The column has automatically switched itself back to Currency (Euro €) on its own, and the value is corrupted back to 3.00. The setting change was not preserved.

### Expected Behavior

The database should preserve the original numeric value entered by the user. Furthermore, when a user changes the column format (e.g., from Currency to plain Number), this setting must be permanently saved and must not automatically roll back to the previous format when changing views.

### Operating System

Windows 11

### AppFlowy Version(s)

0.12.2. (Official build)

### Screenshots

_No response_

### Additional Context

_No response_

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.