From 47f92441aced1e2dd6e85fc18f27330d88e07593 Mon Sep 17 00:00:00 2001
From: Harrison Healey <harrisonmhealey@gmail.com>
Date: Thu, 8 Sep 2016 08:48:53 -0400
Subject: PLT-4100 Made SuggestionList dividers optional (#3990)

* Made SuggestionList dividers optional

* Stopped mutating the User object in the AtMentionProvider
---
 webapp/components/suggestion/suggestion_list.jsx | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

(limited to 'webapp/components/suggestion/suggestion_list.jsx')

diff --git a/webapp/components/suggestion/suggestion_list.jsx b/webapp/components/suggestion/suggestion_list.jsx
index 7c746ac2a..7d8059e1e 100644
--- a/webapp/components/suggestion/suggestion_list.jsx
+++ b/webapp/components/suggestion/suggestion_list.jsx
@@ -121,7 +121,7 @@ export default class SuggestionList extends React.Component {
             // ReactComponent names need to be upper case when used in JSX
             const Component = this.state.components[i];
 
-            if (item.type !== lastType) {
+            if (this.props.renderDividers && item.type !== lastType) {
                 items.push(this.renderDivider(item.type));
                 lastType = item.type;
             }
@@ -157,5 +157,10 @@ export default class SuggestionList extends React.Component {
 
 SuggestionList.propTypes = {
     suggestionId: React.PropTypes.string.isRequired,
-    location: React.PropTypes.string
+    location: React.PropTypes.string,
+    renderDividers: React.PropTypes.bool
 };
+
+SuggestionList.defaultProps = {
+    renderDividers: false
+};
\ No newline at end of file
-- 
cgit v1.2.3-1-g7c22

