+
{/* Show skeleton loader during initial load */}
{isLoading ? (
@@ -219,7 +226,6 @@ const PagedMemoList = (props: Props) => {
renderer={props.renderer}
prefixElement={
<>
-
{showMemoEditor ? (
) : undefined}
@@ -291,14 +297,14 @@ const BackToTop = () => {
export default PagedMemoList;
-const MemoSelectionBar = ({ memoList }: { memoList: Memo[] }) => {
+const MemoSelectionBar = ({ memoList, container }: { memoList: Memo[]; container: HTMLElement | null }) => {
const t = useTranslate();
const selection = useMemoSelection();
const { mutateAsync: updateMemo } = useUpdateMemo();
const { mutateAsync: deleteMemo } = useDeleteMemo();
const [deleteDialogOpen, setDeleteDialogOpen] = useState(false);
- if (!selection || !selection.isSelectionMode) {
+ if (!selection || !selection.isSelectionMode || !container) {
return null;
}
@@ -353,9 +359,9 @@ const MemoSelectionBar = ({ memoList }: { memoList: Memo[] }) => {
}
};
- return (
-
-
{t("memo.selected-count", { count: selectedCount })}
+ return createPortal(
+
+
{t("memo.selected-count", { count: selectedCount })}
+
,
+ container,
);
};