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/ListView.md
+19-1Lines changed: 19 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,10 @@ This control renders a list view for the given set of items.
8
8
9
9

10
10
11
+
**List view control with drag and drop applied**
12
+
13
+

14
+
11
15
## How to use this control in your solutions
12
16
13
17
- 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.
- The control provides full text filtering through all the columns. If you want to exectue filtering on the specified columns, you can use syntax : `<ColumndName>`:`<FilterValue>`. Use `':'` as a separator between column name and value. Control support both `'fieldName'` and `'name'` properties of IColumn interface.
To extend the `ListView` control with a [ContextualMenu](https://developer.microsoft.com/en-us/fabric#/components/contextualmenu) refer to [ListView.ContextualMenu](./ListView.ContextualMenu.md).
63
69
70
+
- With the `onDrop` handler you can define a method that returns files that where drag and drop by user in the list view:
71
+
72
+
```typescript
73
+
private_getDropFiles= (files) => {
74
+
for (var i =0; i<files.length; i++) {
75
+
console.log(files[i].name);
76
+
}
77
+
}
78
+
```
79
+
64
80
## Implementation
65
81
66
82
The ListView control can be configured with the following properties:
@@ -78,6 +94,8 @@ The ListView control can be configured with the following properties:
78
94
| filterPlaceHolder | string | no | Specify the placeholder for the filter text box. Default 'Search' |
79
95
| showFilter | boolean | no | Specify if the filter text box should be rendered. |
80
96
| defaultFilter | string | no | Specify the initial filter to be applied to the list. |
97
+
| onDrop | file | no | Event handler returns files from drag and drop. |
98
+
| stickyHeader | boolean | no | Specifies if the header of the `ListView`, including search box, is sticky |
81
99
82
100
The `IViewField` has the following implementation:
0 commit comments