Update src/components/CommandBar/CommandBarSelectionInput.tsx
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
This commit is contained in:
committed by
Jess Frazelle
parent
d3f788050c
commit
3c89ac8421
@ -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 (
|
||||
|
Reference in New Issue
Block a user