From 7a72bb8b14a3eaa2ce3458c03601ec3819b2e286 Mon Sep 17 00:00:00 2001 From: Jonathan Poltak Samosir Date: Tue, 19 Nov 2024 11:03:48 +0700 Subject: [PATCH] Fix bug with adding page to new space via popup - Prev would update the UI state, but not DB. Thus you'd think that the space was created and the page was added to it, but only the space was created. Page never got indexed. --- src/custom-lists/ui/CollectionPicker/logic.ts | 1 + src/custom-lists/ui/CollectionPicker/types.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/custom-lists/ui/CollectionPicker/logic.ts b/src/custom-lists/ui/CollectionPicker/logic.ts index f6c0850d19..d20f2f9811 100644 --- a/src/custom-lists/ui/CollectionPicker/logic.ts +++ b/src/custom-lists/ui/CollectionPicker/logic.ts @@ -1077,6 +1077,7 @@ export default class SpacePickerLogic extends UILogic< const nextState = this.withMutation(previousState, mutation) this.calcNextFocusedEntry(nextState) + this.dependencies.selectEntry(localListId) return localListId } diff --git a/src/custom-lists/ui/CollectionPicker/types.ts b/src/custom-lists/ui/CollectionPicker/types.ts index d0699e1d6f..4168a63eb5 100644 --- a/src/custom-lists/ui/CollectionPicker/types.ts +++ b/src/custom-lists/ui/CollectionPicker/types.ts @@ -18,6 +18,7 @@ type SpacePickerTab = 'user-lists' | 'page-links' export interface SpacePickerState { query: string + // TODO: Why is this an array? Needs renaming newEntryName: { unifiedId: UnifiedList['unifiedId'] name: UnifiedList['name']