antonycourtney / tad

A desktop application for viewing and analyzing tabular data
http://tadviewer.com
MIT License
3.19k stars 119 forks source link

Render objects and arrays using `JSON.stringify()` instead of `String()` #283

Open andrejp88 opened 2 months ago

andrejp88 commented 2 months ago

I believe this closes #273.

I adjusted the defaultValRender function in reltab to use JSON.stringify() for objects. This lets Tad show the object's fields instead of just showing [Object object].

In order for copy-pasting to work with this logic, I also changed the copySelectedRange function to use the respective column formatter instead of taking the raw value. For some reason, this doesn't seem to respect custom column formatting rules, but it didn't do that before this change either, so I figured that it's probably out of scope for this PR.