-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
first column of objects table fixed #3147
first column of objects table fixed #3147
Conversation
CLA
Hello there and welcome to our project! |
71477e7
to
6300a41
Compare
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.
@Muralidhar22 thanks for your contribution.
This issue requires a bit of extra work :
- The table contains a lot of components and logic
- Thus a full re-render is very costly and is visible by the user
- We only manipulate CSS here
- So we can use direct DOM manipulation via a tableRef
Please also try to create a separate component to hold this part of the tree :
<StyledTable ref={tableRef} className="entity-table-cell">
<RecordTableHeader createRecord={createRecord} />
<RecordTableBodyEffect />
<RecordTableBody />
</StyledTable>
Because the RecordTable component is handling too much logic.
You can get rid of isTabelScrolledState
and use directly useInView
in this new component, and toggle a .shadow
class directly in the onChange
event of useInView.
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.
Nice, that's way better ! We can see it's instantly changing the CSS.
I did a bit of renaming and reorganizing.
closes #2657
Before
After