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
|
// Set selection filter if needed, and reset it when the component unmounts
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
arg.selectionFilter && kclManager.setSelectionFilter(arg.selectionFilter)
|
arg.selectionFilter && kclManager.setSelectionFilter(arg.selectionFilter)
|
||||||
toSync(() => {
|
// TODO: We shouldn't use async here.
|
||||||
return kclManager.defaultSelectionFilter(selection)
|
return toSync(async () => {
|
||||||
}, reportRejection)()
|
await kclManager.defaultSelectionFilter(selection)
|
||||||
|
}, reportRejection)
|
||||||
}, [arg.selectionFilter])
|
}, [arg.selectionFilter])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
Reference in New Issue
Block a user