Skip to content
This repository was archived by the owner on Jul 28, 2025. It is now read-only.

Commit ac7bb84

Browse files
committed
bug about renaming the file
1 parent 75f9815 commit ac7bb84

File tree

6 files changed

+9
-17
lines changed

6 files changed

+9
-17
lines changed

src/components/DefaultHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ export default function DefaultHeader(headerProps: DatabaseHeaderProps) {
177177
labelState={labelState}
178178
setLabelState={setLabelState}
179179
/>,
180-
activeDocument.getElementById(`${view.file.path}-popper`)
180+
activeDocument.body
181181
)
182182
: null}
183183
</>

src/components/index/Database.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ export function Database(tableProps: TableDataType) {
1111
return (
1212
<React.StrictMode>
1313
<Table {...tableProps} tableStore={tableStore} />
14-
<div
15-
id={`${tableProps.view.file.path}-popper`}
16-
key={`${tableProps.view.file.path}-popper-key`}
17-
></div>
1814
</React.StrictMode>
1915
);
2016
}

src/components/portals/CalendarPortal.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@ const CalendarPortal = (calendarProps: CellComponentProps) => {
4343
}
4444

4545
const CalendarContainer = (containerProps: any) => {
46-
const el = activeDocument.getElementById(`${view.file.path}-popper`);
47-
return <Portal container={el}>{containerProps.children}</Portal>;
46+
return (
47+
<Portal container={activeDocument.body}>{containerProps.children}</Portal>
48+
);
4849
};
4950
return showDatePicker ? (
5051
<DatePicker

src/components/portals/CalendarTimePortal.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@ const CalendarTimePortal = (calendarTimeProps: CellComponentProps) => {
4242
}
4343

4444
const CalendarContainer = (containerProps: any) => {
45-
const el = activeDocument.getElementById(`${view.file.path}-popper`);
46-
return <Portal container={el}>{containerProps.children}</Portal>;
45+
return (
46+
<Portal container={activeDocument.body}>{containerProps.children}</Portal>
47+
);
4748
};
4849

4950
return showDatePicker &&

src/components/portals/DataviewFiltersPortal.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,10 +298,7 @@ const DataviewFiltersPortal = (props: DataviewFiltersProps) => {
298298
</Button>
299299

300300
{domReady
301-
? ReactDOM.createPortal(
302-
currentFilters(),
303-
activeDocument.getElementById(`${view.file.path}-popper`)
304-
)
301+
? ReactDOM.createPortal(currentFilters(), activeDocument.body)
305302
: null}
306303
</>
307304
);

src/components/portals/PopperSelectPortal.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -215,10 +215,7 @@ const PopperSelectPortal = (popperProps: CellComponentProps) => {
215215
)}
216216
</div>
217217
{domReady
218-
? ReactDOM.createPortal(
219-
PortalSelect(),
220-
activeDocument.getElementById(`${view.file.path}-popper`)
221-
)
218+
? ReactDOM.createPortal(PortalSelect(), activeDocument.body)
222219
: null}
223220
</>
224221
);

0 commit comments

Comments
 (0)