segmentio / ui-box

Blazing Fast React UI Primitive
MIT License
1.07k stars 55 forks source link

Fix prop pass-thru for objects, including `style` prop #121

Closed brandongregoryscott closed 1 year ago

brandongregoryscott commented 1 year ago

Resolves #120

When support was added for enhancing/serializing nested prop objects (i.e. thru selectors), we didn't account for the style prop that was previously dropping into the if (!enhancer) { preservedProps[property] = value } block, forwarding its original object value.

brandongregoryscott commented 1 year ago

@dlasky I think this should be ready to re-review with the noted edge cases handled (style prop + arbitrary object props that should be forwarded)