There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.
TypeScript appcrdteditorelectronknowledge-basemarkdownmironotesnotionnotion-alternativerustrust-langrust-languagetabletableviewwhiteboardwikiworkspace
fix(core): debounce doc update time update (#7363)
pengx174f07a2cc2abd
diff --git a/packages/frontend/core/src/components/affine/page-properties/table.tsx b/packages/frontend/core/src/components/affine/page-properties/table.tsxindex 302ed9b939..e9b15e8708 100644--- a/packages/frontend/core/src/components/affine/page-properties/table.tsx+++ b/packages/frontend/core/src/components/affine/page-properties/table.tsx@@ -48,6 +48,7 @@ import {} from '@toeverything/infra';import clsx from 'clsx';import { use } from 'foxact/use';+import { useDebouncedValue } from 'foxact/use-debounced-value';import { atom, useAtomValue, useSetAtom } from 'jotai';import type React from 'react';import type {@@ -674,6 +675,8 @@ export const PagePropertiesTableHeader = ({t,]);+ const dTimestampElement = useDebouncedValue(timestampElement, 500);+const handleCollapse = useCallback(() => {onOpenChange(!open);}, [onOpenChange, open]);@@ -691,7 +694,7 @@ export const PagePropertiesTableHeader = ({</div></PageBacklinksPopup>) : null}- {timestampElement}+ {dTimestampElement}</div><Divider /><div className={styles.tableHeaderSecondaryRow}>