summaryrefslogtreecommitdiffstats
path: root/web/react/components/channel_header.jsx
diff options
context:
space:
mode:
authornickago <ngonella@calpoly.edu>2015-06-28 16:36:19 -0700
committernickago <ngonella@calpoly.edu>2015-06-29 15:25:51 -0700
commit9afbc9c206d12b2d38cf853f37f4ba678bbd1d90 (patch)
tree637f852431e54efc4ae82d9a7238877a86c26268 /web/react/components/channel_header.jsx
parente6b5bdef82b23d61286ff455ee245a26a40d195f (diff)
downloadchat-9afbc9c206d12b2d38cf853f37f4ba678bbd1d90.tar.gz
chat-9afbc9c206d12b2d38cf853f37f4ba678bbd1d90.tar.bz2
chat-9afbc9c206d12b2d38cf853f37f4ba678bbd1d90.zip
Sorted the channel members popover lexigraphically
Diffstat (limited to 'web/react/components/channel_header.jsx')
-rw-r--r--web/react/components/channel_header.jsx7
1 files changed, 6 insertions, 1 deletions
diff --git a/web/react/components/channel_header.jsx b/web/react/components/channel_header.jsx
index 428d3ed81..f4e4078a5 100644
--- a/web/react/components/channel_header.jsx
+++ b/web/react/components/channel_header.jsx
@@ -44,8 +44,13 @@ var ExtraMembers = React.createClass({
var count = this.props.members.length == 0 ? "-" : this.props.members.length;
count = this.props.members.length > 19 ? "20+" : count;
var data_content = "";
+ var sortedMembers = this.state.extra_info.members
- this.props.members.forEach(function(m) {
+ sortedMembers.sort(function(a,b) {
+ return a.username.localeCompare(b.username)
+ })
+
+ sortedMembers.forEach(function(m) {
data_content += "<div style='white-space: nowrap'>" + m.username + "</div>";
});