diff options
author | Asaad Mahmood <asaadmahmoodspin@users.noreply.github.com> | 2016-06-30 05:04:37 +0500 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2016-06-29 16:04:37 -0800 |
commit | 1f9eb4db6ab4328e44c8587105eb005890052078 (patch) | |
tree | cc649a09b0684af5ea05ecb8dc609595cf662ac4 /webapp/components/search_results_item.jsx | |
parent | b97b3ae6179bc15ec23e0697b08cdcbdf53e4ffc (diff) | |
download | chat-1f9eb4db6ab4328e44c8587105eb005890052078.tar.gz chat-1f9eb4db6ab4328e44c8587105eb005890052078.tar.bz2 chat-1f9eb4db6ab4328e44c8587105eb005890052078.zip |
Adding expand icon for RHS (#3386)
* Adding expand icon for RHS
Fixing errors
Adding back getTeamInviteLink with better functionality for mobile
Adding vertical align to post__link
Updating improvements for expand RHS stuff
* Improving transition on mobile
* Removing irrelevant changes
Diffstat (limited to 'webapp/components/search_results_item.jsx')
-rw-r--r-- | webapp/components/search_results_item.jsx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/webapp/components/search_results_item.jsx b/webapp/components/search_results_item.jsx index 2f453bc84..217cd5568 100644 --- a/webapp/components/search_results_item.jsx +++ b/webapp/components/search_results_item.jsx @@ -23,10 +23,17 @@ export default class SearchResultsItem extends React.Component { super(props); this.handleFocusRHSClick = this.handleFocusRHSClick.bind(this); + this.shrinkSidebar = this.shrinkSidebar.bind(this); } hideSidebar() { - $('.inner-wrap, .sidebar--right').removeClass('move--left'); + $('.sidebar--right').removeClass('move--left'); + } + + shrinkSidebar() { + setTimeout(() => { + this.props.shrink(); + }); } handleFocusRHSClick(e) { @@ -143,6 +150,7 @@ export default class SearchResultsItem extends React.Component { this.hideSidebar(); } + this.shrinkSidebar(); browserHistory.push('/' + window.location.pathname.split('/')[1] + '/pl/' + post.id); } } @@ -187,5 +195,6 @@ SearchResultsItem.propTypes = { channel: React.PropTypes.object, isMentionSearch: React.PropTypes.bool, term: React.PropTypes.string, - useMilitaryTime: React.PropTypes.bool.isRequired + useMilitaryTime: React.PropTypes.bool.isRequired, + shrink: React.PropTypes.function }; |