-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
fix: 3 first columns should be sticky view group #9123
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.
PR Summary
Fixed sticky column behavior in RecordTable components when view groups are enabled, ensuring proper rendering of the first three columns.
- Modified
RecordTableActionRow.tsx
to split single colspan cell into individual cells for sticky columns - Updated
RecordTableRecordGroupSection.tsx
to remove colspan and addStyledEmptyTd
for proper space handling - Changed
RecordTableBodyDroppable.tsx
to use static 'record-table-body' ID for consistent rendering - Aligned table structure across components to maintain sticky behavior for first three columns
3 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings | Greptile
<StyledEmptyTd colSpan={visibleTableColumns.length - 1} /> | ||
<StyledEmptyTd /> | ||
<StyledEmptyTd /> |
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.
style: Three empty cells at the end may cause layout issues if table structure changes. Consider making this more dynamic based on table configuration.
@@ -23,7 +23,7 @@ export const RecordTableBodyDroppable = ({ | |||
> | |||
{(provided) => ( | |||
<RecordTableBody | |||
id={`record-table-body${recordGroupId ? `-${recordGroupId}` : ''}`} | |||
id="record-table-body" |
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.
logic: removing recordGroupId from ID could cause duplicate IDs if multiple record tables exist on same page
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.
curious to understand why this is not problematic indeed?
@@ -108,6 +108,7 @@ export const RecordTableRecordGroupSection = () => { | |||
/> | |||
<StyledTotalRow>{recordIdsByGroup.length}</StyledTotalRow> | |||
</StyledRecordGroupSection> | |||
<StyledEmptyTd colSpan={visibleColumns.length - 1} /> |
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.
logic: colSpan calculation could underflow if visibleColumns.length is 0 or 1
@@ -23,7 +23,7 @@ export const RecordTableBodyDroppable = ({ | |||
> | |||
{(provided) => ( | |||
<RecordTableBody | |||
id={`record-table-body${recordGroupId ? `-${recordGroupId}` : ''}`} | |||
id="record-table-body" |
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.
curious to understand why this is not problematic indeed?
@ijreilly |
Fix #9113