- Home
- Forum
- React - EJ 2
- Custom Format Number incorrect
Custom Format Number incorrect
Hi team!
I have Sheet1 and Sheet2.
In Sheet1:
Cell F3 has the following format:
- Custom Number Format:
#,##0_);[Red](#,##0) - Color: Green
Step 1: I enter a positive number, and cell F3 displays: 5 in Green.
Step 2: I enter a negative number, and cell F3 displays: (5) in Red.
Step 3: Switch to Sheet2 and return to Sheet1.
Step 4: Enter a positive number, and cell F3 displays in Red.
Shouldn’t it be Green?
Attachment: Screencast_from_21012025_14:03:22_2f2254a1.zip
Hi Ngoc Hoang,
We have confirmed the issue as "Cell formatting updated incorrectly
with custom number format" and logged a bug report and it will be
available in our February 5th patch release. We
appreciate your patience in the meantime. You can track the status of the issue
via the feedback link below.
Feedback link for tracking purpose: https://www.syncfusion.com/feedback/64873/cell-formatting-updated-incorrectly-with-custom-number-format
Disclaimer: "Inclusion of this solution in the weekly release may
change due to other factors including but not limited to QA checks and works re
prioritization".
Hi Ngoc Hoang,
We are glad to announce that our weekly patch release (28.2.5) is rolled out. And we have included the fix for the reported "Cell formatting updated incorrectly with custom number format" issue in this release. So, kindly upgrade your package version to the latest to avail of these changes (28.2.5).
Package link: https://www.npmjs.com/package/@syncfusion/ej2-react-spreadsheet/v/28.2.5
Feedback link: https://www.syncfusion.com/feedback/64873/cell-formatting-updated-incorrectly-with-custom-number-format
For your convenience, we have prepared the sample referring to the fixed package version and attached below along with the output screenshot,
Sample link: https://stackblitz.com/edit/react-gd7vj2yb-gpwadgne?file=package.json,index.js
Output Screenshot:
Issue
Root Cause:
During the sheet switch action, the negative font color (red) was
unintentionally copied at the model level due to shallow copying of the cell.style object.
This mutation affected the shared state, leading to incorrect font color
updates when entering positive values. This issue has been resolved now by
implementing deep copying of the cell.style object instead of a shallow
copy, ensuring that font colors remain correct during sheet switch actions.
Please let us know if you need further assistance on this.
Regards,
Babu.
It is great! Thank you for your hard work.
Hi Ngoc Hoang,
Thank you for your update. Please get back to us for further assistance in the future.
Regards,
Babu.
- 4 Replies
- 3 Participants
- Marked answer
-
NH Ngoc Hoang
- Jan 21, 2025 07:07 AM UTC
- Feb 19, 2025 04:42 AM UTC