Skip to content

Commit 0fc0498

Browse files
ldemarisVesaJuvonen
authored andcommitted
Update view-formatting.md (SharePoint#2036)
Added some clarifications to the doc
1 parent 3dc26c4 commit 0fc0498

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

docs/declarative-customization/view-formatting.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ You can use view formatting to define a totally custom layout of field values in
4242

4343
### Multi-line view
4444

45-
### Multi-line view with an image
46-
4745
## Creating custom JSON
4846

4947
Creating custom view formatting JSON from scratch is simple if you understand the schema. To create your own custom column formatting:
@@ -67,18 +65,28 @@ Creating custom view formatting JSON from scratch is simple if you understand th
6765
6866
## Detailed syntax reference
6967

70-
### hideColumnHeader
68+
### rowFormatter
7169

72-
Optional element. Specifies whether the column headers in the view are hidden or not. *false* is the default behavior inside a list view. *true* means that the view will not display column headers.
70+
Optional element. Specifies a JSON object that describes a view format. The schema of this JSON object is identical to the schema of a column format. For details on this schema and its capabilities, see the [Column Format detailex syntax reference.](https://github.com/SharePoint/sp-dev-docs/blob/master/docs/declarative-customization/column-formatting.md#detailed-syntax-reference)
7371

74-
### hideSelection
72+
#### Differences in behavior between the rowFormatter element and column formatting
7573

76-
Optional element. Specifies whether the ability to select rows in the view is diabled or not. *false* is the default behavior inside a list view. *true* means that users will not be able to select list items.
74+
Despite sharing the same schema, there are some differences in behavior between elements inside a `rowFormatter` element and those same elements in a column formatting object.
75+
76+
* `@currentField` always resolves to the value of the Title field inside a `rowFormatter`.
7777

7878
### additionalRowClass
7979

8080
Optional element. Specifies a CSS class that is applied to the row.
8181

82-
### rowFormatter
82+
`additionalRowClass` only takes effect when there is no `rowFormatter` element specified. If a `rowFormatter` is specified, then `additionalRowClass` is ignored.
8383

84-
Optional element. Specifies a JSON object that describes a view format. The schema of this JSON object is identical to the schema of a column format. For details on this schema and its capabilities, see the [Column Format detailex syntax reference.](https://github.com/SharePoint/sp-dev-docs/blob/master/docs/declarative-customization/column-formatting.md#detailed-syntax-reference)
84+
### hideSelection
85+
86+
Optional element. Specifies whether the ability to select rows in the view is diabled or not. *false* is the default behavior inside a list view. *true* means that users will not be able to select list items.
87+
88+
`hideSelection` only takes effect when there's a `rowFormatter` element specified. If no `rowFormatter` is specified, then `hideSelection` is ignored.
89+
90+
### hideColumnHeader
91+
92+
Optional element. Specifies whether the column headers in the view are hidden or not. *false* is the default behavior inside a list view. *true* means that the view will not display column headers.

0 commit comments

Comments
 (0)