-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement custom report tree for report viewer #2416
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
license-eye has totally checked 677 files.
Valid | Invalid | Ignored | Fixed |
---|---|---|---|
633 | 2 | 42 | 0 |
Click to see the invalid file list
- src/components/custom-treeview/TreeViewItem.tsx
- src/components/custom-treeview/VirtualizedTreeView.tsx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
license-eye has totally checked 685 files.
Valid | Invalid | Ignored | Fixed |
---|---|---|---|
640 | 1 | 44 | 0 |
Click to see the invalid file list
- src/components/custom-treeview/use-treeview-scroll.ts
Signed-off-by: Joris Mancini <joris.mancini_externe@rte-france.com>
96bfff7
to
227b2ae
Compare
Signed-off-by: Joris Mancini <joris.mancini_externe@rte-france.com>
…-virtualized library instead of react-virtualized-auto-sizer for homogeneity purpose
Signed-off-by: Joris Mancini <joris.mancini_externe@rte-france.com>
Signed-off-by: Joris Mancini <joris.mancini_externe@rte-france.com>
</ReportItem> | ||
); | ||
const mapReportsById = useCallback((item: ReportTree) => { | ||
reportTreeMap.current[item.id] = item; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should maybe throw away the old map and assign a new empty object to reportTreeMap.current ?
setSelectedReportType(reportTreeMap.current[report.id].type); | ||
} | ||
}, | ||
[selectedReportId] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe in a separate PR we can try to refactor this code a bit. I find it weird for example that we go to the extend of using a ref for the map of ids to reports to avoid having it in the dependencies of this callback, but at the same time it has selectedReportId in its dependencies which presumably changes more often than the reportTree (and maybe even always changes when the reporttree is changed?).
Another weird thing is top use useCallback for callbacks for VirtualizedTreeview, but not for callbacks for LogTable (onLogRowClick is not a useCallback).. To be cleaned up later I guess
Quality Gate passedIssues Measures |
No description provided.