Skip to content

Commit d9187a5

Browse files
committed
Fixed rowHook data change bug.
1 parent a844fa3 commit d9187a5

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/steps/ValidationStep/utils/dataMutations.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ export const addErrorsAndRunHooks = async <T extends string>(
2424

2525
if (rowHook) {
2626
if (changedRowIndexes != null) {
27-
changedRowIndexes.forEach((index) => rowHook(data[index], (...props) => addHookError(index, ...props), data))
27+
for (const index of changedRowIndexes) {
28+
data[index] = await rowHook(data[index], (...props) => addHookError(index, ...props), data)
29+
}
2830
} else {
2931
data = await Promise.all(
3032
data.map(async (value, index) => rowHook(value, (...props) => addHookError(index, ...props), data)),

0 commit comments

Comments
 (0)