Fix suggestions dropdown counts and empty state

This commit is contained in:
shamoon committed 2026-10-05 19:32:56 -07:00
1 parent dacc213917
commit bc92e4ff98
3 files changed
+62 -8

No files matched your search

@@ -128,7 +128,15 @@ export class SuggestionsDropdownComponent {
}
get totalSuggestions(): number {
return this.novelSuggestions + this.reusableSuggestions
return this.novelSuggestions + this.fieldSuggestions
}
get fieldSuggestions(): number {
return (
this.reusableSuggestions +
(this.suggestions()?.title ? 1 : 0) +
(this.suggestions()?.dates?.length ?? 0)
)
}
private countUnapplied(suggested: number[], applied: number[]): number {
@@ -139,6 +147,7 @@ export class SuggestionsDropdownComponent {
get noSuggestions(): boolean {
const suggestions = this.suggestions()
return (
!this.loading() &&
suggestions != null &&
!suggestions.title &&
!suggestions.tags?.length &&