-
Notifications
You must be signed in to change notification settings - Fork 23
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
Redesign main table #139
Redesign main table #139
Conversation
# Conflicts: # examples/package-lock.json # examples/package.json # package-lock.json # package.json # src/Components/Common/Tooltip/Tooltip.jsx # src/Components/NetworkTable/NetworkCellValue.jsx # src/Components/NetworkTable/NetworkTableHeader.jsx # src/Components/NetworkTable/NetworkTableHeader.styles.scss # src/Components/NetworkTable/NetworkTableRow.jsx # src/Components/NetworkTable/TimeChart.jsx # src/Components/NetworkTable/TimeChart.styles.scss # src/Components/NetworkTable/TimeChartTooltip.jsx # src/Containers/NetworkTableContainer.jsx # src/NetworkViewer.jsx # tests/__tests__/Components/Import/__snapshots__/ImportHar.spec.jsx.snap # tests/__tests__/Components/NetworkTable/__snapshots__/NetworkTableRow.spec.jsx.snap # tests/__tests__/Containers/__snapshots__/FilterContainer.spec.jsx.snap # tests/__tests__/Containers/__snapshots__/MainContainer.spec.jsx.snap # tests/__tests__/__snapshots__/NetworkViewer.spec.jsx.snap
const selectedReqIndex = state.get('selectedReqIndex'); | ||
|
||
const ref = useRef(null); | ||
const { elementDims } = useResizeObserver(ref); |
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.
You can use Autosizer from react-window
that is made to handle dynamic width and height,
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.
I tried using Autosizer for the virtualized table dimensions but it didn't work so well with the current layout.
The ResizeObserver here is used to get the width of the table-body to set it for the table-header. This is necessary because of the scrollbar that can appear for the table-body causing the width of the body to the smaller than the header.
|
||
/* eslint no-underscore-dangle: 0 */ | ||
|
||
export const useResizeObserver = (elementRef) => { |
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.
you might not need it with resize observer with AutoSizer
Description
Redesign of main table component to display network logs.
Types of Changes
What types of changes does your code introduce? Keep the ones that apply: