style
This commit is contained in:
@@ -154,6 +154,7 @@ const useDocumentDrag = () => {
|
||||
const pointerModifierActive = typeof options?.modifierActive === 'boolean'
|
||||
? options.modifierActive
|
||||
: Boolean(event.metaKey || event.ctrlKey || event.shiftKey || event.altKey);
|
||||
const stackReplace = Boolean(options?.stackReplace);
|
||||
|
||||
let selectionIds = Array.isArray(selectedDocumentIds)
|
||||
? selectedDocumentIds.map((id) => String(id))
|
||||
@@ -330,6 +331,7 @@ const useDocumentDrag = () => {
|
||||
groupElevated: !isGroupDrag,
|
||||
stackDocIds: hasStackSource ? stackDocIdsOption : null,
|
||||
stackSelectionApplied: stackSelectionAppliedInitial || !hasStackSource,
|
||||
stackReplace,
|
||||
};
|
||||
|
||||
setDraggingId(docId);
|
||||
@@ -412,10 +414,10 @@ const useDocumentDrag = () => {
|
||||
state.isGroup
|
||||
&& !state.stackSelectionApplied
|
||||
&& Array.isArray(state.stackDocIds)
|
||||
&& state.stackDocIds.length > 1
|
||||
&& state.stackDocIds.length > 0
|
||||
) {
|
||||
if (typeof onDocumentStackSelect === 'function') {
|
||||
onDocumentStackSelect(state.stackDocIds);
|
||||
onDocumentStackSelect(state.stackDocIds, event, { replace: state.stackReplace });
|
||||
}
|
||||
state.stackSelectionApplied = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user