mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-12-27 15:13:46 +00:00
fix: adjust margin bottom (#6370)
This commit is contained in:
parent
88df232139
commit
164933325c
@ -8,7 +8,7 @@ export function Calendar () {
|
||||
const { dayPropGetter, localizer, formats, events, emptyEvents } = useCalendarSetup();
|
||||
|
||||
return (
|
||||
<div className={'database-calendar z-[1] h-fit pb-4 pt-4 text-sm'}>
|
||||
<div className={'database-calendar z-[1] h-fit pb-36 pt-4 text-sm'}>
|
||||
<BigCalendar
|
||||
components={{
|
||||
toolbar: (props) => <Toolbar {...props} emptyEvents={emptyEvents} />,
|
||||
|
||||
@ -27,7 +27,7 @@ export const ListItem = memo(
|
||||
</div>
|
||||
);
|
||||
},
|
||||
areEqual
|
||||
areEqual,
|
||||
);
|
||||
|
||||
export default ListItem;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { DEFAULT_ROW_HEIGHT } from '@/application/database-yjs';
|
||||
import { useCallback, useRef } from 'react';
|
||||
|
||||
export function useMeasureHeight({
|
||||
export function useMeasureHeight ({
|
||||
forceUpdate,
|
||||
rows,
|
||||
}: {
|
||||
@ -19,31 +19,39 @@ export function useMeasureHeight({
|
||||
|
||||
return heightRef.current[row.rowId] || DEFAULT_ROW_HEIGHT;
|
||||
},
|
||||
[rows]
|
||||
[rows],
|
||||
);
|
||||
|
||||
const setRowHeight = useCallback(
|
||||
(index: number, height: number) => {
|
||||
const row = rows[index];
|
||||
const isLastRow = index === rows.length - 1;
|
||||
|
||||
let newHeight = height;
|
||||
|
||||
if (isLastRow) {
|
||||
newHeight += 144;
|
||||
}
|
||||
|
||||
const rowId = row.rowId;
|
||||
|
||||
if (!row || !rowId) return;
|
||||
const oldHeight = heightRef.current[rowId];
|
||||
|
||||
heightRef.current[rowId] = Math.max(oldHeight || DEFAULT_ROW_HEIGHT, height);
|
||||
heightRef.current[rowId] = Math.max(oldHeight || DEFAULT_ROW_HEIGHT, newHeight);
|
||||
|
||||
if (oldHeight !== height) {
|
||||
if (oldHeight !== newHeight) {
|
||||
forceUpdate(index);
|
||||
}
|
||||
},
|
||||
[forceUpdate, rows]
|
||||
[forceUpdate, rows],
|
||||
);
|
||||
|
||||
const onResize = useCallback(
|
||||
(rowIndex: number, columnIndex: number, size: { width: number; height: number }) => {
|
||||
setRowHeight(rowIndex, size.height);
|
||||
},
|
||||
[setRowHeight]
|
||||
[setRowHeight],
|
||||
);
|
||||
|
||||
return {
|
||||
|
||||
@ -103,7 +103,7 @@ export const GridTable = ({ scrollLeft, columnWidth, columns, onScrollLeft }: Gr
|
||||
|
||||
if (row.type === RenderRowType.CalculateRow && column.fieldId) {
|
||||
return (
|
||||
<div style={style}>
|
||||
<div style={style} className={'pb-36'}>
|
||||
<GridCalculateRowCell fieldId={column.fieldId} />
|
||||
</div>
|
||||
);
|
||||
|
||||
@ -46,7 +46,7 @@ export const Document = ({
|
||||
<div
|
||||
style={{
|
||||
minHeight: `calc(100vh - 48px)`,
|
||||
}} className={'mb-16 flex h-full w-full flex-col items-center'}
|
||||
}} className={'mb-36 flex h-full w-full flex-col items-center'}
|
||||
>
|
||||
<ViewMetaPreview {...viewMeta} />
|
||||
<Suspense fallback={<EditorSkeleton />}>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user