Skip to content

Commit f9757e5

Browse files
ldemarisVesaJuvonen
authored andcommitted
Update column-formatting.md (SharePoint#2117)
1 parent a822f7d commit f9757e5

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

docs/declarative-customization/column-formatting.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -756,6 +756,38 @@ Specifies the type of element to create. Valid elements include:
756756

757757
Any other value will result in an error.
758758

759+
#### button elements
760+
761+
`Button` elements can be used to launch a specific action on the parent item. Every `button` element has a requred property, `customRowAction`, that specifies an `action` that's taken when the button is clicked. This action must be one of the following values:
762+
763+
- defaultClick: buttons with this action will do the same thing as clicking the list item in an uncustomized view. Below is an example of a button that, when clicked, simulates a click on the item, which results in the details pane being opened.
764+
765+
```JSON
766+
{
767+
"elmType": "button",
768+
"txtContent": "Open this item",
769+
"customRowAction": {
770+
"action": "defaultClick"
771+
}
772+
}
773+
774+
```
775+
- share: Clicking the button will open the sharing dialog. Below is an example of this type of button.
776+
777+
```JSON
778+
{
779+
"elmType": "button",
780+
"txtContent": "Share this item",
781+
"customRowAction": {
782+
"action": "share"
783+
}
784+
}
785+
786+
```
787+
- delete: Clicking the button will open the delete confirmation dialog.
788+
- editProps: Clicking the button will open the item properties page in edit mode.
789+
- executeFlow: Clicking the button will launch the specified Flow, specified by ID inside the `actionParams` attribute. For an example of this, see the [Create a button to launch a Flow](https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/column-formatting#create-a-button-to-launch-a-flow) section in this document.
790+
759791
### txtContent
760792

761793
An optional property that specifies the text content of the element specified by `elmType`. The value of this property can either be a string (including special strings) or an Expression object.

0 commit comments

Comments
 (0)