I think it'll be useful if it's possible to display user variables next to the user name in the UserList component. For example if it can display the user rating next to the user name. May be if there is component property in which you can state the variables you want to be displayed.
And if the list can be sorted not only by the user name but also by the user variables (the rating in your case) it'll be awesome.
User variables in UserList components
Re: User variables in UserList components
Both UserList & RoomList components have the "labelFunction" & "iconFunction" properties, which are very useful to do what you mention: display user/room properties. You just have to set those properties to your own functions, to which an "item" object is passed at render time. This object contains a reference to the SFS Room object (for the RoomList component) or to the SFS User object (for the UserList), so you can retrieve any info you need to display, also room/user variables. Check this example in the docs.patso wrote:I think it'll be useful if it's possible to display user variables next to the user name in the UserList component. For example if it can display the user rating next to the user name. May be if there is component property in which you can state the variables you want to be displayed.
Currently you can't set a custom sorting function... we will keep this suggestion for the next release!patso wrote:And if the list can be sorted not only by the user name but also by the user variables (the rating in your case) it'll be awesome.
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team