Coder Social home page Coder Social logo

Comments (5)

Bricktheworld avatar Bricktheworld commented on July 1, 2024

Any update on this?

from draw.

Bricktheworld avatar Bricktheworld commented on July 1, 2024

This actually really needs to have some fix to it, because as it stands, I have a list view however when I set the number of items, I always receive an error with there being a more comments option. I would at the very least like an option to detect if there are any "more comments" as a way to ensure that I can get 1 minus the length of the comment forest. Any way I can achieve this?

from draw.

Bricktheworld avatar Bricktheworld commented on July 1, 2024

Ok, have found a solution. Simply check if an element is MoreComment with "if (someCommentForest[index] is MoreComment) "...

I wonder if that would be easy to check in the actual ".length" property in the CommentForest, might make a pull request for that

from draw.

SupremeDeity avatar SupremeDeity commented on July 1, 2024

There needs to be a way to find total comments, because the field on CommentForest is wrong, as it probably doesnt contain replies.

from draw.

SupremeDeity avatar SupremeDeity commented on July 1, 2024

This actually really needs to have some fix to it, because as it stands, I have a list view however when I set the number of items, I always receive an error with there being a more comments option. I would at the very least like an option to detect if there are any "more comments" as a way to ensure that I can get 1 minus the length of the comment forest. Any way I can achieve this?

I dont know what you are doing but you need to call refreshComments() and use the length field. on it. This is the number of top-level comments(without the replies). The num_comments field is supposed to show total comments. Since i have a custom implementation of a treeview for my app, i only the top-level comments length so this works for me.

from draw.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.