Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Promotions milestone 2 #207

Open
wants to merge 18 commits into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/components/TextField/TextField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export type TextFieldProps = FieldProps &
CustomTextFieldProps

export const TextField = forwardRef(({
field: { onBlur: fieldOnBlur, ...restFieldProps },
field: { onBlur: fieldOnBlur, onChange: fieldOnChange, ...restFieldProps },
form: { isSubmitting, touched, errors },
fullWidth = true,
size = "small",
Expand All @@ -29,6 +29,7 @@ export const TextField = forwardRef(({
helperText,
hiddenLabel,
ariaLabel,
onChange,
...props
}: TextFieldProps, ref) => {
const fieldError = getIn(errors, restFieldProps.name) as string;
Expand All @@ -41,6 +42,8 @@ export const TextField = forwardRef(({

const _onBlur = onBlur ?? ((event) => fieldOnBlur(event ?? restFieldProps.name));

const _onChange = onChange ?? fieldOnChange;

return (
<FormControl
fullWidth={fullWidth}
Expand All @@ -62,6 +65,7 @@ export const TextField = forwardRef(({
aria-describedby={helperTextId}
inputProps={{ "aria-label": ariaLabel }}
ref={ref}
onChange={_onChange}
{...props}
{...restFieldProps}
/>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Toast/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ export const Toast = ({ message, autoHideDuration, onExited, ...rest }: ToastPro
};

return (
<Snackbar key={message.key} open={open} autoHideDuration={autoHideDuration || 5000} onClose={handleClose} TransitionProps={{ onExited }} {...rest}>
<Alert severity={message.severity} sx={{ width: "100%" }} variant="filled">
<Snackbar key={message.key} open={open} autoHideDuration={autoHideDuration || 6000} onClose={handleClose} TransitionProps={{ onExited }} {...rest}>
<Alert onClose={handleClose} severity={message.severity} sx={{ width: "100%" }} variant="filled">
{message.message}
</Alert>
</Snackbar>
Expand Down
Loading