AnsweredAssumed Answered

sort comment log with latest first

Question asked by Francesca Shiekh on Sep 25, 2019
Latest reply on Nov 12, 2019 by Francesca Shiekh

I need to sort my comment log by latest first.

 

I can do this in the showCommentLog method of the field's controller by reversing the comments array, but it's not the cleanest way and it interferes with another option I added (limiting the comments displayed to the top five and then adding a "show more/less comments" toggle for records with more than 5 comments).

 

Ideally the comments should be retrieved in the correct order in the first place.

 

So where is the method for the this.model.get('commentlog') hiding?

 

thanks,
FrancescaS

 

Outcomes