You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/documentation/docs/controls/DynamicForm.md
+50Lines changed: 50 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -120,6 +120,56 @@ The `DynamicForm` can be configured with the following properties:
120
120
| thumbnailFieldButtons | IStyle | styles for button when field type is 'Thumbnail' |
121
121
| selectedFileContainer | IStyle | styles for File Selection Control |
122
122
123
+
## Public Methods
124
+
125
+
The `DynamicForm` control exposes the following public methods that can be called using a ref:
126
+
127
+
### updateETag(itemData: any): void
128
+
129
+
Updates the ETag stored in the component's state. This is useful when the list item has been modified externally (e.g., by adding/removing attachments using the ListItemAttachments control) and you need to update the ETag to prevent 412 conflict errors on save.
130
+
131
+
**Parameters:**
132
+
-`itemData` - The updated item data containing the new ETag (typically from SharePoint REST API response with `odata.etag` property)
Copy file name to clipboardExpand all lines: docs/documentation/docs/controls/ListItemAttachments.md
+48Lines changed: 48 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,5 +63,53 @@ The `ListItemAttachments` control can be configured with the following propertie
63
63
| description | string | no | Description text to display on the placeholder, below the main text and icon. |
64
64
| disabled | boolean | no | Specifies if the control is disabled or not. |
65
65
| openAttachmentsInNewWindow | boolean | no | Specifies if the attachment should be opened in a separate browser tab. Use this property set to `true` if you plan to use the component in Microsoft Teams. |
66
+
| onAttachmentChange | (itemData: any) => void | no | Callback function invoked when attachments are added or removed. Receives the updated item data including the new ETag. This is useful when using the control within a form (like DynamicForm) that tracks ETags for optimistic concurrency control. |
67
+
68
+
## Usage with DynamicForm
69
+
70
+
When using `ListItemAttachments` within a `DynamicForm` or any component that uses ETags for optimistic concurrency control, you should use the `onAttachmentChange` callback to update the ETag when attachments are modified:
0 commit comments