Skip to content

Commit

Permalink
Fix bug with adding page to new space via popup
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
poltak committed Nov 19, 2024
1 parent 416044e commit 7a72bb8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/custom-lists/ui/CollectionPicker/logic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
1 change: 1 addition & 0 deletions src/custom-lists/ui/CollectionPicker/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down

0 comments on commit 7a72bb8

Please sign in to comment.