Skip to content

[bug]: blank-slate slot stays stuck when options are added after an initial empty mount (backend-driven data) for post-autocomplete component #8217

Description

@alionazherdetska

🐞 Describe the bug

post-listbox decides whether to show the blank-slate slot based on this.visibleOptions.length, a plain class field, not a Stencil @State()/@Prop(). Mutating a plain field doesn't trigger a re-render in Stencil, so once the listbox mounts with zero options (the normal case for backend/async-driven autocompletes, since data hasn't arrived yet), it renders blank-slate. Even after real <post-listbox-option> elements are added later, the component never re-renders, since nothing reactive actually changed, so blank-slate stays stuck visible indefinitely, even though matching options genuinely exist in the DOM.

Metadata

Metadata

Labels

🐞 bugSomething isn't working📦 componentsRelated to the @swisspost/design-system-components package

Type

Projects

Status
🚀 Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions