havit/Havit.Blazor

[HxSearchBox] Allow hiding the dropdown in action initiated from DefaultContentTemplate or NotFoundTemplate

Closed this issue · 0 comments

There are new use cases where one might want to initiate further actions from the content presented in DefaultContentTemplate, for example, to display a few featured items (rendered in a completely different way, making the "initial suggestions" approach inappropriate).

Currently, when an action is initiated from DefaultContentTemplate or NotFoundTemplate, the dropdown remains visible, and we need to hide it. We could use DropdownAutoClose, but for now, exposing the HideDropdownAsync() method seems like a quick win.

(We won't expose the ShowDropdownAsync() method unless someone presents a reasonable use case.)

Requested by our 190.PWT project.

cc @crdo