← Playground index

Row identity under morph ("data jumps lines")

Two columns, same rows. Left uses INDEX-based container ids; right uses IDENTITY-based. Type a note into a row, then delete a row ABOVE it (which shifts everything up) and watch whether your note follows the right row. With index ids, morph matches the wrong node; with identity ids it follows the row.

Index-based ids (the bug pattern)

pos1 (id=1) delete
pos2 (id=2) delete
pos3 (id=3) delete
pos4 (id=4) delete
pos5 (id=5) delete
pos6 (id=6) delete

Identity-based ids (the fix)

pos1 (id=1) delete
pos2 (id=2) delete
pos3 (id=3) delete
pos4 (id=4) delete
pos5 (id=5) delete
pos6 (id=6) delete