summaryrefslogtreecommitdiffstats
path: root/webapp/components/suggestion/suggestion_list.jsx
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2016-09-08 08:48:53 -0400
committerenahum <nahumhbl@gmail.com>2016-09-08 09:48:53 -0300
commit47f92441aced1e2dd6e85fc18f27330d88e07593 (patch)
treeea27dad1f5f95f8f5b24f2398ee93d65fbc4160e /webapp/components/suggestion/suggestion_list.jsx
parent3bc0e833f75e043728c758fbfbe9194d2d19d6c8 (diff)
downloadchat-47f92441aced1e2dd6e85fc18f27330d88e07593.tar.gz
chat-47f92441aced1e2dd6e85fc18f27330d88e07593.tar.bz2
chat-47f92441aced1e2dd6e85fc18f27330d88e07593.zip
PLT-4100 Made SuggestionList dividers optional (#3990)
* Made SuggestionList dividers optional * Stopped mutating the User object in the AtMentionProvider
Diffstat (limited to 'webapp/components/suggestion/suggestion_list.jsx')
-rw-r--r--webapp/components/suggestion/suggestion_list.jsx9
1 files changed, 7 insertions, 2 deletions
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