day8 / re-frame-10x

A debugging dashboard for re-frame. X-ray vision as tooling.
MIT License
632 stars 68 forks source link

[Enhancement]: 1.2.0 "copy object" should allow non object elements to be copied #329

Closed hipitihop closed 2 years ago

hipitihop commented 2 years ago

What do you suggest?

In 1.2.0 "copy object" is a most welcome addition, however it causes a console error "copy object failed" or similar when used on simple elements/values like strings.

MawiraIke commented 2 years ago

@hipitihop I have managed to reproduce this and I am working to fix it. In the meantime, it seems that typing in the input box to narrow down on a child and then trying to use "copy object" afterwards works. Even after clearing the input box.

MawiraIke commented 2 years ago

After some dive into this, this issue seems to occur specifically when some application state is added after the app-db rendering has been done. After rendering, "copy object" seems to fail to work on the newly added data. For example after a page loads and the re-frame-10x panel is currently watching another tab (like traces, event, fx etc) and then you switch to app-db, everything seems to work as intended.

MawiraIke commented 2 years ago

I have added a commit #333 that should fix this issue. Thank you for spotting it.