From a7d38ce427782b7328c1c55ab33cf70565f93a5d Mon Sep 17 00:00:00 2001 From: Oliver Date: Thu, 13 Jun 2024 04:41:21 +0200 Subject: [PATCH] fix a few type errors --- src/annotations/components/AnnotationEditable.tsx | 4 +--- src/dashboard-refactor/index.tsx | 5 +++-- src/dashboard-refactor/search-results/index.tsx | 4 +++- src/dashboard-refactor/search-results/types.ts | 5 ++++- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/annotations/components/AnnotationEditable.tsx b/src/annotations/components/AnnotationEditable.tsx index 8e929c595d..185ebaa4cf 100644 --- a/src/annotations/components/AnnotationEditable.tsx +++ b/src/annotations/components/AnnotationEditable.tsx @@ -1697,9 +1697,7 @@ const ActionFooterStyled = styled(DefaultFooterStyled)` padding: 0 0px 0px 0px; ` -const HighlightActionsBox = styled.div<{ - compactVersion: boolean -}>` +const HighlightActionsBox = styled.div<{}>` position: absolute; right: 0px; display: flex; diff --git a/src/dashboard-refactor/index.tsx b/src/dashboard-refactor/index.tsx index 79e9551c69..062e215d27 100644 --- a/src/dashboard-refactor/index.tsx +++ b/src/dashboard-refactor/index.tsx @@ -1066,9 +1066,10 @@ export class DashboardContainer extends StatefulUIElement< }) }} spaceSearchSuggestions={this.state.spaceSearchSuggestions} - shiftSelectItems={(itemData) => + shiftSelectItems={(itemId: string, type: 'notes' | 'pages') => this.processEvent('shiftSelectItems', { - item: itemData, + itemId: itemId, + type: type, }) } pageInteractionProps={{ diff --git a/src/dashboard-refactor/search-results/index.tsx b/src/dashboard-refactor/search-results/index.tsx index 79979b47a7..c46a6cffbb 100644 --- a/src/dashboard-refactor/search-results/index.tsx +++ b/src/dashboard-refactor/search-results/index.tsx @@ -769,7 +769,9 @@ export default class SearchResultsContainer extends React.Component< interactionProps.onMatchingTextToggleClick } selectItem={this.props.onBulkSelect} - shiftSelectItem={() => this.shiftSelectItems(page.pageId)} + shiftSelectItem={() => + this.props.shiftSelectItems(page.pageId, 'pages') + } isBulkSelected={this.props.selectedItems?.includes( page.normalizedUrl, )} diff --git a/src/dashboard-refactor/search-results/types.ts b/src/dashboard-refactor/search-results/types.ts index ff207a263d..635c59bf29 100644 --- a/src/dashboard-refactor/search-results/types.ts +++ b/src/dashboard-refactor/search-results/types.ts @@ -323,7 +323,10 @@ export type Events = UIEvent<{ setPageTagPickerShown: PageEventArgs & { isShown: boolean } setPageShareMenuShown: PageEventArgs & { isShown: boolean } setPageNotesShown: PageEventArgs & { areShown: boolean } - shiftSelectItems: PageEventArgs & { selectedIndex; type: 'notes' | 'pages' } + shiftSelectItems: { + itemId: string + type: 'notes' | 'pages' + } onMatchingTextToggleClick: PageEventArgs setActivePage: { activePage: boolean