fix: linter warnings
Massimo Melina committed
May 8, 2022 at 13:50 UTC
dde591b8ec5a8c2b14f921ea4210646ac4cd020f
1 file changed
+1
-4
admin/src/Form.ts
+1
-4
@@ -15,7 +15,6 @@ import {
15
import {
16
Box, BoxProps, Button,
17
Checkbox,
18
- Divider,
18
FormControl,
19
FormControlLabel, FormGroup, FormHelperText,
20
FormLabel,
@@ -206,9 +205,7 @@ export function StringField({ value, onChange, ...props }: FieldProps<string>) {
205
const setter = () => value ?? ''
206
const [state, setState] = useState(setter)
207
209
- useEffect(() => {
210
- setState(setter)
211
- }, [value])
208
+ useEffect(() => setState(setter), [value]) //eslint-disable-line
209
return h(TextField, {
210
fullWidth: true,
211
InputLabelProps: state || props.placeholder ? { shrink: true } : undefined,