Skip to content

Commit

Permalink
fix event type issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick-1979 committed Jun 23, 2024
1 parent f27064e commit fe4f279
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/extension-polkagate/src/components/ProfileInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default function ProfileInput({ disabled = false, placeHolder = '', setPr
}
}, [containerRef?.current?.offsetWidth]);

const handleProfile = useCallback((value?:string): void => {
const handleProfile = useCallback((value?: string): void => {
setTogglePopper(false);

if (!value) {
Expand All @@ -66,7 +66,7 @@ export default function ProfileInput({ disabled = false, placeHolder = '', setPr
<Label
helperText={helperText}
label={label}
style={{ position: 'relative', width:'100%' }}
style={{ position: 'relative', width: '100%' }}
>
<Autocomplete
componentsProps={{ paper: { sx: { '> ul': { m: 0, p: 0 }, border: '2px solid', borderColor: 'secondary.light', maxHeight: window.innerHeight / 2, ml: '-1px', my: '5px', p: 0, width: dropdownWidth } } }}
Expand All @@ -87,8 +87,7 @@ export default function ProfileInput({ disabled = false, placeHolder = '', setPr
InputProps={{
...params.InputProps,
}}
// @ts-ignore
onChange={() => handleProfile(event?.target?.value)}
onChange={(event: React.ChangeEvent<HTMLInputElement>) => handleProfile(event.target.value)}
placeholder={placeHolder}
sx={{ '> div.MuiOutlinedInput-root': { '> fieldset': { border: 'none' }, '> input.MuiAutocomplete-input': { border: 'none', lineHeight: '31px', p: 0 }, border: 'none', height: '31px', p: 0, px: '5px' }, bgcolor: 'background.paper', border: `${focus ? '2px' : '1px'} solid`, borderColor: `${focus ? 'action.focus' : 'secondary.light'}`, borderRadius: '5px', height: '32px', lineHeight: '31px' }}
/>
Expand Down

0 comments on commit fe4f279

Please sign in to comment.