AppFlowy-IO / AppFlowy-IO/AppFlowy

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

Đang mở
#8,807 0 bình luận 0 reaction 1 người được giao Được @appflowy nhận Xem trên GitHub
Ngôn ngữ chính
Dart
Star
76.6k
Fork
6k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### 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_

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.