From 6b685f5183175183445716b923bd3c7ed484d121 Mon Sep 17 00:00:00 2001 From: bill bittner Date: Fri, 19 Jan 2018 16:03:49 -0800 Subject: [PATCH] removed PublishMetadataInputs' internal state and removed unnecessary event.preventDefault s --- react/actions/publish.js | 7 ++++ react/components/ExpandingTextArea.jsx | 21 ++++------ react/constants/action_types.js | 1 + react/containers/ChannelCreateForm/view.jsx | 2 - react/containers/ChannelLoginForm/view.jsx | 1 - .../containers/PublishMetadataInputs/index.js | 12 ++++-- .../containers/PublishMetadataInputs/view.jsx | 40 +++++++------------ .../containers/PublishThumbnailInput/view.jsx | 1 - react/containers/PublishTitleInput/view.jsx | 1 - react/containers/PublishUrlInput/view.jsx | 1 - react/reducers/publish.js | 11 +++-- 11 files changed, 46 insertions(+), 52 deletions(-) diff --git a/react/actions/publish.js b/react/actions/publish.js index f2cb6dea..40dad4ed 100644 --- a/react/actions/publish.js +++ b/react/actions/publish.js @@ -58,3 +58,10 @@ export function updateSelectedChannel (value) { value, }; }; + +export function toggleMetadataInputs (value) { + return { + type: actions.TOGGLE_METADATA_INPUTS, + value, + }; +}; diff --git a/react/components/ExpandingTextArea.jsx b/react/components/ExpandingTextArea.jsx index d628b8de..c6a3fdaf 100644 --- a/react/components/ExpandingTextArea.jsx +++ b/react/components/ExpandingTextArea.jsx @@ -3,11 +3,11 @@ import PropTypes from 'prop-types'; class ExpandingTextarea extends Component { componentDidMount () { - this._adjustTextarea({}); + this.adjustTextarea({}); } render () { - const { onChange, maxHeight, ...rest } = this.props; + const { onChange, ...rest } = this.props; return (