githubocto / flat-ui

MIT License
370 stars 23 forks source link

feat(store): enable deep comparison of objects in diffs #4

Closed LoneRifle closed 3 years ago

LoneRifle commented 3 years ago

When determining diffs, old and new values for a given row of data are compared using the equality operator. This does not work for objects, which would need comparison of the entire object. Further, the store currently assumes objects to be strings when generating schema.

A possible solution would be to recognise object values during schema generation, and performing a deep comparison for such values when determining diffs.

This PR consists of two parts:

refactor(store): separate number and string-related schema generation

feat(store): enable deep comparison of objects in diffs

Wattenberger commented 3 years ago

looks great! thanks for digging into that. I added support for object cell types, which provides a little peak at the underlying data

image