Skip to content
This repository was archived by the owner on Jun 1, 2020. It is now read-only.

Commit b6e9436

Browse files
committed
Update Password Widget changing InputField for TextField
Resolve #79
1 parent 9d7d59f commit b6e9436

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/PasswordWidget/PasswordWidget.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import React from 'react';
22

33
import FormControl from '@material-ui/core/FormControl';
4-
import Input from '@material-ui/core/Input';
5-
import InputLabel from '@material-ui/core/InputLabel';
4+
import TextField from '@material-ui/core/TextField';
65

76
import { WidgetProps } from 'react-jsonschema-form';
87

@@ -36,16 +35,17 @@ const PasswordWidget = ({
3635
//error={!!rawErrors}
3736
required={required}
3837
>
39-
<InputLabel>{label || schema.title}</InputLabel>
40-
<Input
38+
<TextField
39+
id={id}
40+
label={label || schema.title}
4141
autoFocus={autofocus}
4242
required={required}
4343
disabled={disabled || readonly}
4444
type="password"
4545
value={value ? value : ''}
46+
onChange={_onChange}
4647
onFocus={_onFocus}
4748
onBlur={_onBlur}
48-
onChange={_onChange}
4949
/>
5050
</FormControl>
5151
);

0 commit comments

Comments
 (0)