Fix issue with memoizing onclick handlers nested inside conditional UI conditions
This commit is contained in:
parent
3fc345a8fe
commit
0a12089a54
|
@ -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()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue