Headless UI Combobox Autocomplete Search Bar(焦点问题)

问题描述 投票:0回答:0

我正在使用 Headless UI Combobox 作为自动完成搜索栏(React/Remix 应用程序)。

提交搜索后,我想模糊()输入,以便焦点返回到我的页面。

但是,我正在重新关注 Combobox 和 Combobox.Input 在我运行 blur() 之后看似不确定的时间

我尝试将我的 blur() 放在各种地方,但输入总是在之后重新获得焦点。我破解它的唯一方法是为我的模糊使用 setTimeout()

input autocomplete focus remix headless-ui
© www.soinside.com 2019 - 2024. All rights reserved.