Fix Event.target TypeScript errors
This commit is contained in:
@@ -113,7 +113,7 @@ const UserProfilesPage: FunctionComponent = () => {
|
||||
};
|
||||
|
||||
page.addEventListener('click', function (e) {
|
||||
const btnUserMenu = dom.parentWithClass(e.target, 'btnUserMenu');
|
||||
const btnUserMenu = dom.parentWithClass(e.target as HTMLElement, 'btnUserMenu');
|
||||
|
||||
if (btnUserMenu) {
|
||||
showUserMenu(btnUserMenu);
|
||||
|
||||
@@ -44,7 +44,7 @@ const SearchFields: FunctionComponent<SearchFieldsProps> = ({ onSearch = () => {
|
||||
|
||||
useEffect(() => {
|
||||
getSearchInput()?.addEventListener('input', e => {
|
||||
debouncedOnSearch(normalizeInput(e.target?.value));
|
||||
debouncedOnSearch(normalizeInput((e.target as HTMLInputElement).value));
|
||||
});
|
||||
getSearchInput()?.focus();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user