[PR #3051] fix: sorting rows with cells that are empty #13952

Closed
opened 2026-03-24 21:48:06 +00:00 by mirror · 0 comments
Owner

Original Pull Request: https://github.com/AppFlowy-IO/AppFlowy/pull/3051

State: closed
Merged: No


When there are unchecked, initialized checkbox cells with empty cells, the empty cells are automatically sent to the end of the grid. Even when I add a second sort, say, by text, the empty cell will still be at the end even if it should've shifted up a bit.

There is quite a bit of extra code here, but unless we initialize every single checkbox cell, some extra logic is necessary.

Before:

https://github.com/AppFlowy-IO/AppFlowy/assets/71320345/a44f91cc-33f6-49d7-b4d5-d988118860ee

at 0:25, AB and AD are true, AE is false, and the others are empty. When I sort by checkbox, the natural order should be preserved instead of AE at the bottom. Worse still when I sort by Name, the order doesn't change

Feature Preview


PR Checklist

  • My code adheres to the AppFlowy Style Guide
  • I've listed at least one issue that this PR fixes in the description above.
  • I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes.
  • All existing tests are passing.
**Original Pull Request:** https://github.com/AppFlowy-IO/AppFlowy/pull/3051 **State:** closed **Merged:** No --- When there are unchecked, initialized checkbox cells with empty cells, the empty cells are automatically sent to the end of the grid. Even when I add a second sort, say, by text, the empty cell will still be at the end even if it should've shifted up a bit. There is quite a bit of extra code here, but unless we initialize every single checkbox cell, some extra logic is necessary. Before: https://github.com/AppFlowy-IO/AppFlowy/assets/71320345/a44f91cc-33f6-49d7-b4d5-d988118860ee at 0:25, AB and AD are true, AE is false, and the others are empty. When I sort by checkbox, the natural order should be preserved instead of AE at the bottom. Worse still when I sort by Name, the order doesn't change ### Feature Preview <!--- List at least one issue here that this PR addresses. If it fixes the issue, please use the [fixes](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests) keyword to close the issue. For example: fixes https://github.com/AppFlowy-IO/AppFlowy/pull/2106 --> --- <!--- Before you mark this PR ready for review, run through this checklist! --> #### PR Checklist - [x] My code adheres to the [AppFlowy Style Guide](https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/software-contributions/submitting-code/style-guides) - [ ] I've listed at least one issue that this PR fixes in the description above. - [x] I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes. - [ ] All existing tests are passing.
mirror 2026-03-24 21:48:06 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#13952
No description provided.