(rows: TableRow[])
| 771 | // would place the new row in a different slot than the server (e.g. an |
| 772 | // uppercase-prefixed key), leaving it visibly misordered until next reload. |
| 773 | const sortRows = (rows: TableRow[]) => |
| 774 | byKey |
| 775 | ? [...rows].sort((a, b) => |
| 776 | (a.orderKey as string) < (b.orderKey as string) |
| 777 | ? -1 |
| 778 | : (a.orderKey as string) > (b.orderKey as string) |
| 779 | ? 1 |
| 780 | : 0 |
| 781 | ) |
| 782 | : [...rows].sort((a, b) => a.position - b.position) |
| 783 | const fitsAfter = (last: TableRow | undefined) => |
| 784 | last === undefined || |
| 785 | (byKey |
no outgoing calls
no test coverage detected