typescript
This commit is contained in:
@@ -65,8 +65,8 @@ export const createPointerIntent = ({
|
||||
const alreadySelected = selectedDocumentIds.includes(doc.id);
|
||||
const selectionCount = Array.isArray(selectedDocumentIds) ? selectedDocumentIds.length : 0;
|
||||
|
||||
let clickAction = CLICK_ACTIONS.none;
|
||||
let dragAction = DRAG_ACTIONS.none;
|
||||
let clickAction: ClickAction = CLICK_ACTIONS.none;
|
||||
let dragAction: DragAction = DRAG_ACTIONS.none;
|
||||
|
||||
if (metaKey) {
|
||||
clickAction = CLICK_ACTIONS.addStack;
|
||||
@@ -79,8 +79,8 @@ export const createPointerIntent = ({
|
||||
dragAction = DRAG_ACTIONS.dragSelectSingle;
|
||||
}
|
||||
|
||||
const stackList = Array.isArray(stackHits) && stackHits.length > 0
|
||||
? stackHits.slice()
|
||||
const stackList: string[] = Array.isArray(stackHits) && stackHits.length > 0
|
||||
? stackHits.map((value) => String(value))
|
||||
: [String(doc.id)];
|
||||
|
||||
const stackDocIdsForDrag = dragAction === DRAG_ACTIONS.dragSelectStack ? stackList : null;
|
||||
@@ -160,9 +160,9 @@ export const applyLongPressSelection = ({ intent, stackDocIds, syntheticEvent, o
|
||||
return;
|
||||
}
|
||||
|
||||
const stackCopy = Array.isArray(stackDocIds) && stackDocIds.length > 0
|
||||
? stackDocIds.slice()
|
||||
: [intent.docId];
|
||||
const stackCopy: string[] = Array.isArray(stackDocIds) && stackDocIds.length > 0
|
||||
? stackDocIds.map((value) => String(value))
|
||||
: [String(intent.docId)];
|
||||
|
||||
safeInvoke(onDocumentStackSelect, stackCopy, syntheticEvent, { replace: true });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user