1
0
Fork 0
mirror of synced 2024-07-03 05:20:32 +12:00

Fix issue with memoizing onclick handlers nested inside conditional UI conditions

This commit is contained in:
Andrew Kingston 2021-08-23 16:39:09 +01:00
parent 3fc345a8fe
commit 0a12089a54

View file

@ -51,6 +51,12 @@ export const enrichProps = (props, context) => {
condition.settingValue,
totalContext
)
// If there is an onclick function in here then it won't be serialised
// properly, and therefore will not be updated properly.
// The solution to this is add a rand which will ensure diffs happen
// every time.
condition.rand = Math.random()
}
})
}