small usability changes
This commit is contained in:
parent
8385f08923
commit
7fafa35b4b
5 changed files with 23 additions and 46 deletions
|
|
@ -41,6 +41,7 @@ function nestedInputProperties({state, setState, score, typeInfo, evalResult}: C
|
|||
setState(state => ({...state, input: callback(state.input)}));
|
||||
};
|
||||
const onInputCancel = () => {
|
||||
|
||||
setState(state => /*addFocusRightMost*/(state.fn)); // we become our function
|
||||
};
|
||||
const scoreInput = (inputSuggestion: ExprBlockState) => {
|
||||
|
|
@ -52,7 +53,9 @@ function nestedInputProperties({state, setState, score, typeInfo, evalResult}: C
|
|||
export function CallBlock(props: CallBlockProps) {
|
||||
const globalContext = useContext(GlobalContext);
|
||||
const addParam = getActions(globalContext, props.setState).c;
|
||||
return <span className={"functionBlock"}>
|
||||
const err = props.typeInfo.err || props.evalResult.err;
|
||||
|
||||
return <span className="functionBlock dropdownContainer">
|
||||
<CallContext value={{addParam}}>
|
||||
<FunctionHeader {...props} addParam={addParam} />
|
||||
<div className="functionParams">
|
||||
|
|
@ -66,6 +69,12 @@ export function CallBlock(props: CallBlockProps) {
|
|||
</div>
|
||||
</div>
|
||||
</CallContext>
|
||||
{(err !== undefined) &&
|
||||
<span className="">
|
||||
<div className="errorMessage">
|
||||
{err.message.trim()}
|
||||
</div>
|
||||
</span>}
|
||||
</span>;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue