refactor a bit more
This commit is contained in:
parent
230916ceb1
commit
fdbf43a4e9
11 changed files with 79 additions and 90 deletions
|
|
@ -21,11 +21,10 @@ interface LambdaBlockProps<
|
|||
FnState=ExprBlockState,
|
||||
InputState=ExprBlockState,
|
||||
> extends State2Props<LambdaBlockState,ExprBlockState> {
|
||||
addParam: (e: ExprBlockState) => void;
|
||||
}
|
||||
|
||||
|
||||
export function LambdaBlock({state, setState, suggestionPriority, addParam}: LambdaBlockProps) {
|
||||
export function LambdaBlock({state, setState, suggestionPriority}: LambdaBlockProps) {
|
||||
const env = useContext(EnvContext);
|
||||
|
||||
const setParamName = paramName => setState(state => ({
|
||||
|
|
@ -59,11 +58,9 @@ export function LambdaBlock({state, setState, suggestionPriority, addParam}: Lam
|
|||
placeholder="<name>"
|
||||
text={state.paramName}
|
||||
suggestion=""
|
||||
focus={state.focus}
|
||||
onEnter={() => {}}
|
||||
onCancel={() => {}}
|
||||
onTextChange={txt => setParamName(txt)}
|
||||
setFocus={focus => setState(state => ({...state, focus}))}
|
||||
extraHandlers={{}}
|
||||
/>
|
||||
</span>
|
||||
|
|
@ -83,7 +80,6 @@ export function LambdaBlock({state, setState, suggestionPriority, addParam}: Lam
|
|||
// console.log('suggestionPriority of lambdaInner... just passing through');
|
||||
return suggestionPriority(s);
|
||||
}}
|
||||
addParam={addParam}
|
||||
/>
|
||||
</EnvContext>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue