Boolean create UI (#5906)
* first steps, add to cmd bar etc * cmdbar working well enough * mvp * lint * fix after rebase * intersect and union mvps * add test * some clean up * further fix up * Update src/lang/modifyAst/boolean.ts Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> * Update src/lang/modifyAst/boolean.ts Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> * pierre's comments * tsc * add comment --------- Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
This commit is contained in:
@ -7,6 +7,7 @@ import {
|
||||
} from 'lib/selections'
|
||||
import { useSelector } from '@xstate/react'
|
||||
import { commandBarActor, useCommandBarState } from 'machines/commandBarMachine'
|
||||
import { kclManager } from 'lib/singletons'
|
||||
|
||||
const selectionSelector = (snapshot: any) => snapshot?.context.selectionRanges
|
||||
|
||||
@ -56,6 +57,12 @@ export default function CommandBarSelectionMixedInput({
|
||||
}
|
||||
}, [])
|
||||
|
||||
// Set selection filter if needed, and reset it when the component unmounts
|
||||
useEffect(() => {
|
||||
arg.selectionFilter && kclManager.setSelectionFilter(arg.selectionFilter)
|
||||
return () => kclManager.defaultSelectionFilter(selection)
|
||||
}, [arg.selectionFilter])
|
||||
|
||||
function handleChange() {
|
||||
inputRef.current?.focus()
|
||||
}
|
||||
|
Reference in New Issue
Block a user