fix(frontend): Table diff not working when row count does not change

This commit is contained in:
2025-12-30 19:20:08 +01:00
parent 6ef6f74c4e
commit 99cecdbcb2
2 changed files with 34 additions and 6 deletions

View File

@@ -54,8 +54,15 @@ export function compareApplicationFormValues(
? formatUserValueLabel(versionValue, versionData.element.options, versionData.element.type)
: null
// Skip if labels are the same (actual displayed values haven't changed)
if (currentLabel === versionLabel) {
// Skip if values are the same (actual values haven't changed)
// For tables, compare the serialized data directly since labels only show row count
if (elementType === 'TABLE') {
const currentSerialized = typeof currentValue === 'string' ? currentValue : null
const versionSerialized = typeof versionValue === 'string' ? versionValue : null
if (currentSerialized === versionSerialized) {
continue
}
} else if (currentLabel === versionLabel) {
continue
}