Skip to content

Commit 7fc1e28

Browse files
New Control List item comments (#979)
* commit chnages new conbtrol listItemComments * ListItemComments changes Update * ListItemComments changes Update * commit changes * commit chnages on List Item Comments * commit add docs to ListItemComments * commit chnages on listItem comments and control test * Update ListItemComments.md * commit add strings to ListItemComments * Update mystrings.d.ts remove extra empty spaces * commit changes on strings ListItemComments * commit chnages ListItemCOmments strings * Update pt-pt.ts remove extra space * Update ru-ru.ts Add missing strings Co-authored-by: Joel Rodrigues <[email protected]>
1 parent ef52d1f commit 7fc1e28

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+2182
-31
lines changed
17.6 MB
Loading
439 KB
Loading
272 KB
Loading
290 KB
Loading
264 KB
Loading
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# ListItemComments control
2+
3+
This control allows you to manage list item comments, you can add or delete comments to an item. The comments are listed in tile view.
4+
user can scroll to load more comments if they exist (infinite scroll);
5+
6+
7+
Here is an example of the control:
8+
9+
![ListItemComments](../assets/ListItemComments.gif)
10+
11+
![ListItemComments](../assets/ListItemComments01.png)
12+
13+
![ListItemComments](../assets/ListItemComments02.png)
14+
15+
![ListItemComments](../assets/ListItemComments03.png)
16+
17+
![ListItemComments](../assets/ListItemComments04.png)
18+
19+
## How to use this control in your solutions
20+
21+
- Check that you installed the `@pnp/spfx-controls-react` dependency. Check out the [getting started](../../#getting-started) page for more information about installing the dependency.
22+
- Import the control into your component:
23+
24+
```TypeScript
25+
import { ListItemComments } from '@pnp/spfx-controls-react/lib/ListItemComments';
26+
```
27+
- Use the `ListItemComments` control in your code as follows:
28+
29+
```TypeScript
30+
<ListItemComments webUrl='{"https://contoso.sharepoint.com/sites/ThePerspective"}'
31+
listId='dfa283f4-5faf-4d54-b6b8-5bcaf2725af5'
32+
itemId={1}
33+
serviceScope={serviceScope}
34+
numberCommentsPerPage={10}
35+
label="ListItem Comments"
36+
/>
37+
```
38+
39+
40+
## Implementation
41+
42+
The `ListItemComments` control can be configured with the following properties:
43+
44+
45+
| Property | Type | Required | Description |
46+
| ---- | ---- | ---- | ---- |
47+
| serviceScope | ServiceScope | yes | SPFx Service Scope |
48+
| itemId | number | yes | List Item Id |
49+
| listId | string | yes | Guid of the list. |
50+
| webUrl | string | no | URL of the site. By default it uses the current site URL. |
51+
| label | string | no | Label for control |
52+
| numberCommentsPerPage | number | no | number of comments per page possible values 5 | 10 | 15 | 20 default 10 |
53+
54+
## MSGraph Permissions required
55+
56+
This control required the flowing scopes:
57+
at least : People.Read
58+
59+
![](https://telemetry.sharepointpnp.com/sp-dev-fx-controls-react/wiki/controls/ListItemComments)

0 commit comments

Comments
 (0)