@@ -35,6 +35,7 @@ This example applies the class `sp-field-severity--severeWarning` to a list view
35
35
36
36
``` JSON
37
37
{
38
+ "schema" : " https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json" ,
38
39
"additionalRowClass" : {
39
40
"operator" : " ?" ,
40
41
"operands" : [
@@ -58,6 +59,7 @@ This example was adopted from a column formatting example, [Conditional formatti
58
59
59
60
``` JSON
60
61
{
62
+ "schema" : " https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json" ,
61
63
"additionalRowClass" : {
62
64
"operator" : " ?" ,
63
65
"operands" : [
@@ -147,16 +149,13 @@ This example uses the `rowFormatter` element, which totally overrides the render
147
149
148
150
``` JSON
149
151
{
152
+ "schema" : " https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json" ,
150
153
"hideSelection" : " true" ,
151
154
"hideListHeader" : " true" ,
152
155
"rowFormatter" : {
153
156
"elmType" : " div" ,
154
- "style" : {
155
- "padding" : " 12px" ,
156
- "overflow" : " hidden" ,
157
- "border-radius" : " 2px" ,
158
- "box-shadow" : " 0 1.6px 3.6px 0 #dddddd, 0 0.3px 0.9px 0 #e3e3e3" ,
159
- "margin-bottom" : " 12px"
157
+ "attributes" : {
158
+ "class" : " sp-row-card"
160
159
},
161
160
"children" : [
162
161
{
@@ -167,36 +166,28 @@ This example uses the `rowFormatter` element, which totally overrides the render
167
166
"children" : [
168
167
{
169
168
"elmType" : " div" ,
170
- "style" : {
171
- "font-size" : " 16px" ,
172
- "font-weight" : " 600" ,
173
- "padding-bottom" : " 8px"
169
+ "attributes" : {
170
+ "class" : " sp-row-title"
174
171
},
175
172
"txtContent" : " [$Title]"
176
173
},
177
174
{
178
175
"elmType" : " div" ,
179
- "txtContent " : " [$Feedback] " ,
180
- "style " : {
181
- "padding-bottom" : " 4px "
182
- }
176
+ "attributes " : {
177
+ "class " : " sp-row-listPadding "
178
+ },
179
+ "txtContent" : " [$Feedback] "
183
180
},
184
181
{
185
182
"elmType" : " button" ,
186
183
"customRowAction" : {
187
184
"action" : " defaultClick"
188
185
},
189
186
"txtContent" : " Give feedback" ,
187
+ "attributes" : {
188
+ "class" : " sp-row-button"
189
+ },
190
190
"style" : {
191
- "cursor" : " pointer" ,
192
- "font-weight" : " 600" ,
193
- "background-color" : " #f4f4f4" ,
194
- "border" : " 1px solid transparent" ,
195
- "margin-top" : " 4px" ,
196
- "padding" : " 0 16 0 16px" ,
197
- "height" : " 32px" ,
198
- "border-radius" : " 2px" ,
199
- "box-shadow" : " 0 0 0 0 #ffffff" ,
200
191
"display" : {
201
192
"operator" : " ?" ,
202
193
"operands" : [
@@ -232,7 +223,7 @@ Creating custom view formatting JSON from scratch is simple if you understand th
232
223
233
224
``` JSON
234
225
{
235
- "$schema" : " http ://listformatting.sharepointpnp .com/viewFormattingSchema .json"
226
+ "$schema" : " https ://developer.microsoft .com/json-schemas/sp/view-formatting.schema .json"
236
227
}
237
228
```
238
229
0 commit comments