Skip to content

Commit

Permalink
Make new entries appear in navigation list
Browse files Browse the repository at this point in the history
We use `{dontNavigate: true}` so that the search bar won't be changed.
  • Loading branch information
rmunn committed Jan 10, 2025
1 parent bf552c7 commit 51398bb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/viewer/src/ProjectView.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@
$entries?.push(entry);//need to add it before refresh, otherwise it won't get selected because it's not in the list
if (!options?.dontNavigate) {
navigateToEntry(entry, headword(entry));
} else {
refreshEntries();
}
}
Expand Down Expand Up @@ -336,7 +338,7 @@
<div class="max-sm:hidden flex-grow"></div>
<div slot="actions" class="flex items-center gap-2 lg-view:gap-4 whitespace-nowrap">
{#if !readonly}
<NewEntryDialog bind:this={newEntryDialog} />
<NewEntryDialog bind:this={newEntryDialog} on:created={(e) => onEntryCreated(e.detail.entry, {dontNavigate: true})} />
{/if}
{#if $features.history}
<ActivityView {projectName}/>
Expand Down

0 comments on commit 51398bb

Please sign in to comment.