Skip to content
This repository has been archived by the owner on Oct 11, 2022. It is now read-only.

Commit

Permalink
Resolve React warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Stoiber committed Dec 19, 2018
1 parent 359e601 commit 460fa50
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/components/chatInput/style.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// @flow
import React from 'react';
import theme from 'shared/theme';
import styled, { css } from 'styled-components';
import Textarea from 'react-textarea-autosize';
Expand Down Expand Up @@ -97,7 +98,9 @@ export const InputWrapper = styled.div`
}
`;

export const Input = styled(Textarea).attrs({
export const Input = styled(({ hasAttachment, networkDisabled, ...rest }) => (
<Textarea {...rest} />
)).attrs({
spellCheck: true,
autoCapitalize: 'sentences',
autoComplete: 'on',
Expand Down
3 changes: 2 additions & 1 deletion src/views/thread/components/threadDetail.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ type Props = {
dispatch: Dispatch<Object>,
currentUser: ?Object,
toggleEdit: Function,
innerRef?: any,
};

class ThreadDetailPure extends React.Component<Props, State> {
Expand Down Expand Up @@ -341,7 +342,7 @@ class ThreadDetailPure extends React.Component<Props, State> {
: null;

return (
<ThreadWrapper>
<ThreadWrapper innerRef={this.props.innerRef}>
<ThreadContent isEditing={isEditing}>
{/* $FlowFixMe */}
<ErrorBoundary fallbackComponent={null}>
Expand Down
2 changes: 1 addition & 1 deletion src/views/thread/container.js
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ class ThreadContainer extends React.Component<Props, State> {
toggleEdit={this.toggleEdit}
thread={thread}
slider={slider}
ref={c => (this.threadDetailElem = c)}
innerRef={c => (this.threadDetailElem = c)}
/>
</React.Fragment>
);
Expand Down

0 comments on commit 460fa50

Please sign in to comment.