---
title: "Save an inline edit to the intended row"
description: "Verify an inline cell edit follows the correct record identity when table sorting changes after the edited value is committed."
canonical_url: "https://vostride.com/agent-library/data-tables/inline-edit-row-identity.md"
md_url: "https://vostride.com/agent-library/data-tables/inline-edit-row-identity.md"
content_kind: "recipe"
topic: "data-tables"
---

# Save an inline edit to the intended row

Verify an inline cell edit follows the correct record identity when table sorting changes after the edited value is committed.

## Risk

Index-based row handling can apply an edit to a neighbor when a saved value changes the sort order. Use distinct record names and make the target move across another row after saving.

## Fixtures

- A test capacity table has Atlas with value 10, Birch with 20, and Cedar with 30.
- The table is sorted by capacity ascending, and the intended edit changes Birch from 20 to 5.
- A prepared record check maps each immutable row key to its original and expected capacity.

## Steps

1. Open the table and verify the initial ascending order Atlas, Birch, Cedar with their fixture values.
2. Activate the inline Capacity editor on Birch, enter 5, and save the cell.
3. Verify Birch moves to the first row with value 5 while Atlas remains 10 and Cedar remains 30.
4. Open Birch detail and verify its saved capacity is 5, then return and inspect the other two rows.
5. Reload and run the prepared record check to verify only the Birch identifier changed and the final order remains Birch, Atlas, Cedar.

## Expected results

- The saved mutation belongs to the Birch key even after its row position changes.
- Atlas and Cedar retain their original values and identifiers.
- The sorted presentation recomputes using the new value and agrees with saved record detail.

## False-pass traps

- A first row showing 5 can be a false pass if the edit was accidentally applied to Atlas.
- Checking the edited cell before the save response settles does not establish persisted row identity.

## Cleanup

- Restore Birch capacity to 20 or remove the three capacity fixtures.

## Use with agent-qa

Adapt this test design to your application's acceptance criteria and configured target using the [recipe execution guide](/agent-library/software-factory/turn-a-recipe-into-an-agent-qa-test.md). External fixture setup and non-UI checks require your own supported hooks or test tooling. Validate the authored test, execute it, and inspect the completed evidence; this recipe is not a recorded test result.

## References

- [agent-qa test](/docs/agent-qa/configuration/test.md)
- [agent-qa first test](/docs/agent-qa/guides/first-test.md)
- [agent-qa web testing](/docs/agent-qa/guides/web-testing.md)

- [Data table QA recipes](/agent-library/data-tables.md)
- [Software factory QA library](/agent-library.md)
