diff --git a/webapp/channels/src/components/new_search/search_box_input.tsx b/webapp/channels/src/components/new_search/search_box_input.tsx index 1b0faa6900..92347e5b93 100644 --- a/webapp/channels/src/components/new_search/search_box_input.tsx +++ b/webapp/channels/src/components/new_search/search_box_input.tsx @@ -75,7 +75,7 @@ type Props = { focus: (newPosition: number) => void; } -const SearchInput = ({searchTerms, searchType, setSearchTerms, onKeyDown, focus}: Props, inputRef: React.Ref) => { +const SearchInput = forwardRef(({searchTerms, searchType, setSearchTerms, onKeyDown, focus}, inputRef) => { const intl = useIntl(); let searchPlaceholder = intl.formatMessage({id: 'search_bar.search', defaultMessage: 'Search'}); @@ -131,6 +131,6 @@ const SearchInput = ({searchTerms, searchType, setSearchTerms, onKeyDown, focus} )} ); -}; +}); -export default forwardRef(SearchInput); +export default SearchInput; diff --git a/webapp/channels/src/components/threading/channel_threads/thread_footer/__snapshots__/thread_footer.test.tsx.snap b/webapp/channels/src/components/threading/channel_threads/thread_footer/__snapshots__/thread_footer.test.tsx.snap index f5a967e52f..a92d4fec15 100644 --- a/webapp/channels/src/components/threading/channel_threads/thread_footer/__snapshots__/thread_footer.test.tsx.snap +++ b/webapp/channels/src/components/threading/channel_threads/thread_footer/__snapshots__/thread_footer.test.tsx.snap @@ -15,7 +15,7 @@ exports[`components/threading/channel_threads/thread_footer should match snapsho isFollowing={true} onClick={[Function]} > - - + @@ -317,7 +317,7 @@ exports[`components/threading/channel_threads/thread_footer should report total - - + - - + - - + - - + , Props> -function Button({ - prepend, - append, - children, - isActive, - hasDot, - marginTop, - allowTextOverflow = false, - ...attrs -}: Props & Attrs) { +const Button = React.forwardRef(( + { + prepend, + append, + children, + isActive, + hasDot, + marginTop, + allowTextOverflow = false, + ...attrs + }, + ref, +) => { return ( ); -} +}); +Button.displayName = 'Button'; export default memo(Button); diff --git a/webapp/channels/src/components/threading/common/follow_button/__snapshots__/follow_button.test.tsx.snap b/webapp/channels/src/components/threading/common/follow_button/__snapshots__/follow_button.test.tsx.snap index 94aeeeb4a8..0b069e27e9 100644 --- a/webapp/channels/src/components/threading/common/follow_button/__snapshots__/follow_button.test.tsx.snap +++ b/webapp/channels/src/components/threading/common/follow_button/__snapshots__/follow_button.test.tsx.snap @@ -5,7 +5,7 @@ exports[`components/threading/common/follow_button should say follow 1`] = ` isFollowing={false} onClick={[MockFunction]} > - - + `; @@ -30,7 +30,7 @@ exports[`components/threading/common/follow_button should say following 1`] = ` - - + `;