Skip to content

Commit

Permalink
Fix Record Inline Cell position on Edit mode (twentyhq#5038)
Browse files Browse the repository at this point in the history
Fixed 0.5 offset of inline cell edit mode
  • Loading branch information
lucasbordeau authored Apr 18, 2024
1 parent 220a0e9 commit 88c14b7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ export const RecordInlineCellEditMode = ({
}: RecordInlineCellEditModeProps) => {
const { refs, floatingStyles } = useFloating({
placement: 'right',
middleware: [flip(), offset(-1)],
middleware: [
flip(),
offset({
crossAxis: -0.5,
}),
],
whileElementsMounted: autoUpdate,
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const RecordTableRow = ({ recordId, rowIndex }: RecordTableRowProps) => {
<RecordTableCellFieldContextWrapper />
</RecordTableCellContext.Provider>
))
: visibleTableColumns.map((column, columnIndex) => (
: visibleTableColumns.map((column) => (
<td key={column.fieldMetadataId}></td>
))}
<td></td>
Expand Down

0 comments on commit 88c14b7

Please sign in to comment.