Closed bofeiw closed 7 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated (UTC) |
---|---|---|---|
rowy-os | ✅ Ready (Inspect) | Visit Preview | Jan 23, 2024 0:00am |
rowy-typedoc | ✅ Ready (Inspect) | Visit Preview | Jan 23, 2024 0:00am |
Issue
Sort does not work if table has formula column.
Example: in this table setup, the right-most column is a formula column. The table sort is set to num descending, however the table UI displays rows order incorrectly.
Cause
In a commit related to formula field, it sets all rows to
rowsLocal
if there is formula column in the table. https://github.com/rowyio/rowy/blob/2715a8094aa740bd6c783ad7e28fb24f6973cded/src/atoms/tableScope/rowActions.ts#L389-L391rowsLocal
is designed to hold our of order rows that are supposed to be a very small set, and they are always displayed at the top of the table UI. They are not sorted or ordered. https://github.com/rowyio/rowy/blob/0099bd1daca3f722b05ebbd5294eb31837382b2d/src/atoms/tableScope/table.ts#L170-L197However, the commit would set all rows to rowsLocal, as a result, rows are displayed without going through filters or sorts.
Fix
Simply remove the condition for local row would fix this issue.
After fix: