CommentsThread
Lists a record's comments and provides a box to post one through the data provider. resolvable adds a button to mark a comment resolved. Refreshes on comment events when the provider supports realtime.
Installation
pnpm dlx shadcn@latest add @chelone/comments-threadLoading preview…
Lists a record's comments and provides a box to post one through the data provider. resolvable adds a button to mark a comment resolved. Refreshes on comment events when the provider supports realtime.
See the realtime guide for provider setup and usage.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | — | |
| perPage | number | — | How many comments to fetch. Default 100. |
| record | { id?: Identifier | null } | — | Defaults to the record context. |
| reference | string | — | The resource that holds the comments. |
| resolvable | boolean | — | Adds a `Mark resolved` button to unresolved comments. Default false. |
| target | string | — | The field on a comment that holds the id of its parent record. |