Comment
Last updated
Was this helpful?
Last updated
Was this helpful?
The Comment component in Lowcoder facilitates user engagement by enabling the display and management of user-generated comments. It is ideal for applications requiring feedback, discussions, or threaded conversations.
User Information Display: Showcases user avatars, names, and timestamps alongside comments.
Nested Replies: Supports threaded discussions by allowing replies to comments.
Interactive Actions: Includes options for actions like replying, editing, or deleting comments.
Dynamic Data Binding: Integrates seamlessly with data sources for real-time updates.
Customisable Styling: Offers flexibility in appearance to match application themes.
Data Source Integration: Bind comments to APIs or databases for dynamic content.
Avatar and User Details: Customize the display of user information associated with each comment.
Action Handlers: Define behaviors for actions like reply, edit, or delete.
Styling Options: Adjust layout, colors, and fonts to align with your application's design.
Data Binding: Utilize Lowcoder's data binding syntax ({{ }}
) to connect comment data to dynamic sources.
Event Handling: Implement event handlers to perform actions when users interact with comments, such as submitting a reply or deleting a comment.
Combining with Other Components: Integrate the Comment component with forms or user profiles to enhance user interaction.
On Component Playground, you can interact with the Comment component and explore it's Properties, Events and Methods. Play with different Styling properties to see the effect on the Comment component.
In the Auto-Docs of Comment component, we have shown how to use different properties of the Comment component. It also includes the Styling properties of the Comment component.
These properties are accessible in {{ }} notations, as well as in JavaScript Queries.
commentList
Array
Returns an Array of Objects containing the list of Comments along with User details of the Comment component
deletedItem
Array
Returns an Array of Objects containing the most latest deleted comment of the Comment component
hidden
Boolean
Returns True or False based on whether the Comment component is hidden or not
mentionName
String
Returns a String containing the name of the most recently tagged Person of the Rating component
submittedItem
Object
Returns an Object containing the most recent Comment along with User details of the Comment component
Events give you the ability to trigger further actions (with Event-Handlers).
Click
Triggers, when a User clicks on the User name or Avatar on the Comment component
Submit
Triggers, when a User submits a new Comment
Delete
Triggers, when a User deletes a Comment
Mention
Triggers, when a User mentions anyone in the Comment
You have the capability to engage with components via their respective methods, which can be accessed by their designated names within any segment where JavaScript is utilized. Additionally, these components can be activated through the 'Control Component' action, which is triggered in response to specific events.
setCommentList() :
comment1.setCommentList() method sets the Comment component's CommentList property, which gets shown in the Comment component.
clearCommentList() :
comment1.clearCommentList() clears the Comment component's CommentList property and empties the Comments from the Comment component.
resetCommentList() :
comment1.resetCommentList() method resets the Comment component's CommentList property to the default CommentList of the Comment component.
setDeletedItem() :
comment1.setDeletedItem method sets the Comment component's DeletedItem property.
clearDeletedItem() :
comment1.clearDeletedItem() clears the Comment component's DeletedItem property and empties the DeletedItem property from the Comment component.
resetDeletedItem() :
comment1.resetDeletedItem() method resets the Comment component's DeletedItem property to the default DeletedItem property of the Comment component.
setSubmitedItem() :
comment1.setSubmitedItem() method sets the Comment component's SubmitedItem property.
clearSubmitedItem() :
comment1.clearSubmitedItem() clears the Comment component's SubmitedItem property and empties the SubmitedItem property from the Comment component.
resetSubmitedItem() :
comment1.resetSubmitedItem method resets the Comment component's SubmitedItem property to the default SubmitedItem property of the Comment component.
Feedback Sections: Collect user feedback on products or services.
Discussion Forums: Facilitate conversations among users on various topics.
Support Threads: Enable users to ask questions and receive answers in a threaded format.
Content Comments: Allow users to comment on articles, blogs, or media content.