Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ export class StompGuard<T> {
) {
this._value = parentGetter();
watch(parentGetter, (newParentValue) => {
if (newParentValue === this._value) return; // we probably updated the parent

if (this._dirty) {
// ignore and revert parent changes
parentSetter(this._value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
{#if entryResource.loading}
Loading...
{:else if entry}
<EntryEditor autofocus modalMode {entry} canAddSense={false} canAddExample={false}/>
<EntryEditor autofocus modalMode bind:entry canAddSense={false} canAddExample={false}/>
{/if}
<Dialog.DialogFooter>
<Button onclick={() => open = false} variant="secondary">{$t`Cancel`}</Button>
Expand Down
4 changes: 2 additions & 2 deletions frontend/viewer/src/project/browse/EntryView.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@

let latestPersistedSnapshot = $state<ReadonlyDeep<IEntry>>();
const entryPersistence = new EntryPersistence(() => latestPersistedSnapshot);
const entry = $derived(entryResource.current ?? undefined);
let entry = $derived(entryResource.current ?? undefined);
const headword = $derived((entry && writingSystemService.headword(entry)) || $t`Untitled`);
const loadingDebounced = new Debounced(() => entryResource.loading, 50);
let dictionaryPreview: 'show' | 'hide' | 'sticky' = $state('show');
Expand Down Expand Up @@ -157,7 +157,7 @@
</div>
{/if}
<div class="max-md:p-2 md:pb-2 md:px-2">
<EntryEditor bind:ref={editorRef} {entry} readonly={readonly || !features.write || deleted} {...entryPersistence.entryEditorProps} />
<EntryEditor bind:ref={editorRef} bind:entry readonly={readonly || !features.write || deleted} {...entryPersistence.entryEditorProps} />
</div>
</ScrollArea>
{/if}
Expand Down
Loading