[fix] setNativeProps logic

setNativeProps method was ignoring previously changed style.

Close #1939
Fix ##1935
This commit is contained in:
Krzysztof Piaskowy
2021-03-15 13:57:29 +01:00
committed by Nicolas Gallagher
parent 889827e3a4
commit c0abdbfaae
@@ -19,11 +19,12 @@ const emptyObject = {};
function setNativeProps(node, nativeProps, classList, pointerEvents, style, previousStyleRef) {
if (node != null && nativeProps) {
const previousStyle = previousStyleRef ? previousStyleRef.current : {};
const domProps = createDOMProps(null, {
pointerEvents,
...nativeProps,
classList: [classList, nativeProps.className],
style: [style, nativeProps.style]
style: [style, previousStyle, nativeProps.style]
});
const nextDomStyle = domProps.style;