mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 20:38:52 +00:00
fix(core): update and fix oxlint error (#13591)
#### PR Dependency Tree * **PR #13591** 👈 * **PR #13590** This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - Bug Fixes - Improved drag-and-drop stability: draggables, drop targets, and monitors now respond when option sources or external data change. - Improved async actions and permission checks to always use the latest callbacks and error handlers. - Chores - Lint/Prettier configs updated to ignore the Git directory. - Upgraded oxlint dev dependency. - Tests - Updated several end-to-end tests for more reliable text selection, focus handling, and timing. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -84,7 +84,7 @@ export const useDraggable = <D extends DNDData = DNDData>(
|
||||
: undefined,
|
||||
};
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [...deps, context.toExternalData]);
|
||||
}, [...deps, getOptions, context.toExternalData]);
|
||||
|
||||
useEffect(() => {
|
||||
if (
|
||||
|
||||
@@ -207,7 +207,7 @@ export const useDropTarget = <D extends DNDData = DNDData>(
|
||||
: undefined,
|
||||
};
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [...deps, dropTargetContext.fromExternalData]);
|
||||
}, [...deps, getOptions, dropTargetContext.fromExternalData]);
|
||||
|
||||
const getDropTargetOptions = useCallback(() => {
|
||||
const wrappedCanDrop = dropTargetGet(options.canDrop, options);
|
||||
|
||||
@@ -95,7 +95,7 @@ export const useDndMonitor = <D extends DNDData = DNDData>(
|
||||
: undefined,
|
||||
};
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [...deps, getOptions]);
|
||||
}, [...deps, getOptions, dropTargetContext.fromExternalData]);
|
||||
|
||||
const monitorOptions = useMemo(() => {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user