Update src/components/CommandBar/CommandBarSelectionInput.tsx

Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
This commit is contained in:
Jess Frazelle
2025-03-31 09:01:17 -07:00
committed by Jess Frazelle
parent d3f788050c
commit 3c89ac8421

View File

@ -128,9 +128,10 @@ function CommandBarSelectionInput({
// Set selection filter if needed, and reset it when the component unmounts
useEffect(() => {
arg.selectionFilter && kclManager.setSelectionFilter(arg.selectionFilter)
toSync(() => {
return kclManager.defaultSelectionFilter(selection)
}, reportRejection)()
// TODO: We shouldn't use async here.
return toSync(async () => {
await kclManager.defaultSelectionFilter(selection)
}, reportRejection)
}, [arg.selectionFilter])
return (