Fix Record Inline Cell position on Edit mode (#5038)

Fixed 0.5 offset of inline cell edit mode
This commit is contained in:
Lucas Bordeau 2024-04-18 15:46:40 +02:00 committed by GitHub
parent 220a0e91d2
commit 88c14b7e52
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View File

@ -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,
});

View File

@ -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>