zui
zui copied to clipboard
null rootRecord when clicking primitive value in Inspector view
Repro is with Zui commit b727a2e.
Steps shown in the attached video:
- Begin Preview & Load of the attached words.gz test data (after uncompressing)
- Select the Line data format
- Click Query Pool
- Click to switch to the Inspector view
- Click a value in the table
As shown in the attached video, this generates an Unhandled Runtime Error.
https://github.com/brimdata/zui/assets/5934157/f54080ce-d628-4504-8058-6fc8d6c4567f
That error text:
Unhandled Runtime Error
TypeError: Cannot read properties of null (reading 'rootRecord')
Source
src/views/results-pane/inspector.tsx (64:34) @ rootRecord
62 | valueProps={{
63 | onClick: (e, value, field) => {
> 64 | const rootValue = field.rootRecord
| ^
65 | dispatch(Selection.set({value, field, rootValue}))
66 | if (field && field instanceof zed.Field) {
67 | dispatch(viewLogDetail(field.rootRecord))
Call Stack
fn
src/views/inspector/templates/item.tsx (14:12)
FWIW,
- This error is not new. I could repro it in the last GA Zui release
v1.7.0
, for instance. - This error is not visible to the user in a production build. It that case it goes only to DevTools.
So, probably not a high priority, but worth cleaning up at some point.