AppFlowy-IO / AppFlowy-IO/AppFlowy

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

未关闭
#8,807 0 条评论 0 个 reaction 已指派 1 人 已被 @appflowy 认领 在 GitHub 查看
主要语言
Dart
星标
76.6k
派生
6k
PR 合并指标
30 天内没有已合并 PR

描述

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

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。