فهرست منبع

add ForwardRefRenderFunction type

Shun Miyazawa 3 سال پیش
والد
کامیت
464f4056a2
1فایلهای تغییر یافته به همراه4 افزوده شده و 2 حذف شده
  1. 4 2
      packages/app/src/components/Admin/AuditLog/SearchUsernameTypeahead.tsx

+ 4 - 2
packages/app/src/components/Admin/AuditLog/SearchUsernameTypeahead.tsx

@@ -1,5 +1,5 @@
 import React, {
-  Fragment, useState, useCallback, useRef, forwardRef, useImperativeHandle,
+  Fragment, useState, useCallback, useRef, ForwardRefRenderFunction, forwardRef, useImperativeHandle,
 } from 'react';
 
 import { AsyncTypeahead, Menu, MenuItem } from 'react-bootstrap-typeahead';
@@ -26,7 +26,7 @@ type Props = {
   onChange: (text: string[]) => void
 }
 
-export const SearchUsernameTypeahead = forwardRef<IClearable, Props>((props: Props, ref) => {
+const SearchUsernameTypeaheadSubstance: ForwardRefRenderFunction<IClearable, Props> = ((props: Props, ref) => {
   const { onChange } = props;
   const { t } = useTranslation();
 
@@ -133,3 +133,5 @@ export const SearchUsernameTypeahead = forwardRef<IClearable, Props>((props: Pro
     </div>
   );
 });
+
+export const SearchUsernameTypeahead = forwardRef(SearchUsernameTypeaheadSubstance);