add blurableinput to step tiles
parent
ebb9efce23
commit
519fd62598
|
@ -2,6 +2,7 @@ import * as React from "react";
|
|||
import { updateStep } from "../step_tiles/index";
|
||||
import { isString, isNumber } from "lodash";
|
||||
import { StepInputProps } from "../interfaces";
|
||||
import { BlurableInput } from "../../ui";
|
||||
|
||||
export function InputDefault({
|
||||
step,
|
||||
|
@ -15,7 +16,11 @@ export function InputDefault({
|
|||
let notUndefied = (isString(raw) || isNumber(raw));
|
||||
let val = notUndefied ? raw : "";
|
||||
|
||||
return <input type={type_ || "text"}
|
||||
value={val}
|
||||
onChange={updateStep({ dispatch, step, field, index, sequence })} />;
|
||||
return (
|
||||
<BlurableInput
|
||||
type={type_ || "text"}
|
||||
value={val}
|
||||
onCommit={updateStep({ dispatch, step, field, index, sequence })}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ interface BIProps {
|
|||
onCommit(e: React.SyntheticEvent<HTMLInputElement>): void;
|
||||
min?: number;
|
||||
max?: number;
|
||||
type?: "text" | "number" | "email" | "password" | "time" | "date";
|
||||
type?: "text" | "number" | "email" | "password" | "time" | "date" | "hidden";
|
||||
name?: string;
|
||||
id?: string;
|
||||
/** Allow the user to empty out the form control. If unset, form control
|
||||
|
|
Loading…
Reference in New Issue