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
2 changed files with 7 additions and 2 deletions

View File

@ -32,7 +32,12 @@ export const RecordInlineCellEditMode = ({
}: RecordInlineCellEditModeProps) => { }: RecordInlineCellEditModeProps) => {
const { refs, floatingStyles } = useFloating({ const { refs, floatingStyles } = useFloating({
placement: 'right', placement: 'right',
middleware: [flip(), offset(-1)], middleware: [
flip(),
offset({
crossAxis: -0.5,
}),
],
whileElementsMounted: autoUpdate, whileElementsMounted: autoUpdate,
}); });

View File

@ -72,7 +72,7 @@ export const RecordTableRow = ({ recordId, rowIndex }: RecordTableRowProps) => {
<RecordTableCellFieldContextWrapper /> <RecordTableCellFieldContextWrapper />
</RecordTableCellContext.Provider> </RecordTableCellContext.Provider>
)) ))
: visibleTableColumns.map((column, columnIndex) => ( : visibleTableColumns.map((column) => (
<td key={column.fieldMetadataId}></td> <td key={column.fieldMetadataId}></td>
))} ))}
<td></td> <td></td>