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
"`TreeView`: Added (optional) property 'defaultExpandedChildren' that controls the behavior of the expansion of child elements.[#698](https://github.com/pnp/sp-dev-fx-controls-react/pull/698)"
17
+
],
18
+
"fixes": [
19
+
"`RichText`: Cannot add link in first line [#672](https://github.com/pnp/sp-dev-fx-controls-react/issues/672)",
20
+
"`TaxonomyPicker`: Ability to reset the TaxonomyPicker (Remove all selected Terms) [#367](https://github.com/pnp/sp-dev-fx-controls-react/issues/367)",
21
+
"Documentation fix for `TaxonomyPicker`: the `disabled` property is a `boolean` and not a `string` as currently specified [#695](https://github.com/pnp/sp-dev-fx-controls-react/pull/695)",
22
+
"`ComboBoxListItemPicker`: update options when `listId` has been changed [#683](https://github.com/pnp/sp-dev-fx-controls-react/issues/683)",
23
+
"`FilePicker`: styles are updated to match OOB control [#700](https://github.com/pnp/sp-dev-fx-controls-react/issues/700)"
-`TreeView`: Added (optional) property 'defaultExpandedChildren' that controls the behavior of the expansion of child elements.[#698](https://github.com/pnp/sp-dev-fx-controls-react/pull/698)
16
+
17
+
### Fixes
18
+
19
+
-`RichText`: Cannot add link in first line [#672](https://github.com/pnp/sp-dev-fx-controls-react/issues/672)
20
+
-`TaxonomyPicker`: Ability to reset the TaxonomyPicker (Remove all selected Terms) [#367](https://github.com/pnp/sp-dev-fx-controls-react/issues/367)
21
+
- Documentation fix for `TaxonomyPicker`: the `disabled` property is a `boolean` and not a `string` as currently specified [#695](https://github.com/pnp/sp-dev-fx-controls-react/pull/695)
22
+
-`ComboBoxListItemPicker`: update options when `listId` has been changed [#683](https://github.com/pnp/sp-dev-fx-controls-react/issues/683)
23
+
-`FilePicker`: styles are updated to match OOB control [#700](https://github.com/pnp/sp-dev-fx-controls-react/issues/700)
24
+
25
+
### Contributors
26
+
27
+
Special thanks to our contributors (in alphabetical order): [Abderahman88](https://github.com/Abderahman88), [André Lage](https://github.com/aaclage), [Gautam Sheth](https://github.com/gautamdsheth).
-`TreeView`: Added (optional) property 'defaultExpandedChildren' that controls the behavior of the expansion of child elements.[#698](https://github.com/pnp/sp-dev-fx-controls-react/pull/698)
16
+
17
+
### Fixes
18
+
19
+
-`RichText`: Cannot add link in first line [#672](https://github.com/pnp/sp-dev-fx-controls-react/issues/672)
20
+
-`TaxonomyPicker`: Ability to reset the TaxonomyPicker (Remove all selected Terms) [#367](https://github.com/pnp/sp-dev-fx-controls-react/issues/367)
21
+
- Documentation fix for `TaxonomyPicker`: the `disabled` property is a `boolean` and not a `string` as currently specified [#695](https://github.com/pnp/sp-dev-fx-controls-react/pull/695)
22
+
-`ComboBoxListItemPicker`: update options when `listId` has been changed [#683](https://github.com/pnp/sp-dev-fx-controls-react/issues/683)
23
+
-`FilePicker`: styles are updated to match OOB control [#700](https://github.com/pnp/sp-dev-fx-controls-react/issues/700)
24
+
25
+
### Contributors
26
+
27
+
Special thanks to our contributors (in alphabetical order): [Abderahman88](https://github.com/Abderahman88), [André Lage](https://github.com/aaclage), [Gautam Sheth](https://github.com/gautamdsheth).
Copy file name to clipboardExpand all lines: docs/documentation/docs/controls/ListView.md
+21-2Lines changed: 21 additions & 2 deletions
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.
- With the `groupByFields` property you can define an array of field objects which will be used for grouping.
46
52
47
53
**Important**: the same order of the fields defines how grouping will be applied. In the snippet the `ListView` control will first group by the `Extension` and after that by the `Author` field.
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,9 @@ 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
+
| dragDropFiles | boolean | no | Specify the drag and drop files area option. Default false. |
98
+
| onDrop | file | no | Event handler returns files from drag and drop. |
99
+
| stickyHeader | boolean | no | Specifies if the header of the `ListView`, including search box, is sticky |
81
100
82
101
The `IViewField` has the following implementation:
| items | ITreeItem[] | yes | An array of tree items to display. refer [example](#example-of-array-of-tree-items-used-to-render-control-as-in-first-screenshot). |
91
-
| defaultExpanded | boolean | no | Specify if the tree items are displayed as expanded by default (defaults to false). |
92
+
| defaultExpanded | boolean | no | Specify if the tree items are displayed as expanded by default (defaults to false. |
92
93
| selectionMode | enum | no | Specifies the selection mode of tree view (defaults to Single selection). |
93
94
| selectChildrenIfParentSelected | boolean | no | Specifies if the childrens should be selected when parent item is selected (defaults to false). |
94
95
| showCheckboxes | boolean | yes | Specify if the checkboxes should be displayed for selection. |
@@ -98,6 +99,7 @@ The `TreeView` control can be configured with the following properties:
98
99
| onExpandCollapse | function | no | Defines a onExpandCollapse function to raise when the tree item has expanded or collapsed. |
99
100
| onSelect | function | no | Captures the event of when the tree item selection has changed. |
100
101
| onRenderItem | function | no | Optional callback to provide custom rendering of the item (default is simple text of item label and a checkbox for selection). |
102
+
| defaultExpandedChildren | boolean | no | Default expand / collapse behavior for the child nodes. By default this is set to true. |
- Use the `FieldRendererHelper.getFieldRenderer` method to asynchronously request proper React control (As the method returns `Promise` it should be called in one of React component lifecycle methods, for example, `componentWillMount` that will occur before `render`):
0 commit comments