Skip to content

Commit 8e0f441

Browse files
committed
Merge branch 'v1-dev' into v1
2 parents e0cae23 + eacb4ed commit 8e0f441

File tree

21 files changed

+355
-34
lines changed

21 files changed

+355
-34
lines changed

.circleci/config.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
defaults: &defaults
22
working_directory: ~/sp-dev-fx-controls-react
33
docker:
4-
- image: circleci/node:8.9.1
4+
- image: circleci/node:8.9.4
55

66
version: 2
77
jobs:
@@ -126,25 +126,34 @@ workflows:
126126
- build:
127127
filters:
128128
branches:
129-
ignore: /^(dev|master)/
129+
ignore: /^(dev|master|v2|v1-dev)/
130130
release_next:
131131
jobs:
132132
- build:
133133
filters:
134134
branches:
135-
only: dev
135+
only:
136+
- dev
137+
- v2
138+
- v1-dev
136139
- build_next:
137140
requires:
138141
- build
139142
filters:
140143
branches:
141-
only: dev
144+
only:
145+
- dev
146+
- v2
147+
- v1-dev
142148
- publish_next:
143149
requires:
144150
- build_next
145151
filters:
146152
branches:
147-
only: dev
153+
only:
154+
- dev
155+
- v2
156+
- v1-dev
148157
release:
149158
jobs:
150159
- build:

CHANGELOG.JSON

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,32 @@
11
{
22
"versions": [
3+
{
4+
"version": "1.21.1",
5+
"changes": {
6+
"new": [],
7+
"enhancements": [
8+
"`ListView`: drag and drop [#711](https://github.com/pnp/sp-dev-fx-controls-react/pull/711)",
9+
"`TaxonomyPicker`: control does not show an error message for an invalid/unresolved input [#728](https://github.com/pnp/sp-dev-fx-controls-react/issues/728)"
10+
],
11+
"fixes": [
12+
"`RichText`: Fixing hyperlink issues [#708](https://github.com/pnp/sp-dev-fx-controls-react/pull/708)"
13+
]
14+
},
15+
"contributions": [
16+
"[Abderahman Moujahid](https://github.com/Abderahman88)",
17+
"[André Lage](https://github.com/aaclage)"
18+
]
19+
},
20+
{
21+
"version": "1.21.0",
22+
"changes": {
23+
"new": [],
24+
"enhancements": [],
25+
"fixes": [
26+
"`TaxonomyPicker`: Ability to reset the TaxonomyPicker (Remove all selected Terms) [#367](https://github.com/pnp/sp-dev-fx-controls-react/issues/367)"
27+
]
28+
}
29+
},
330
{
431
"version": "1.20.0",
532
"changes": {

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
# Releases
22

3+
## 1.21.1
4+
5+
### Enhancements
6+
7+
- `ListView`: drag and drop [#711](https://github.com/pnp/sp-dev-fx-controls-react/pull/711)
8+
- `TaxonomyPicker`: control does not show an error message for an invalid/unresolved input [#728](https://github.com/pnp/sp-dev-fx-controls-react/issues/728)
9+
10+
### Fixes
11+
12+
- `RichText`: Fixing hyperlink issues [#708](https://github.com/pnp/sp-dev-fx-controls-react/pull/708)
13+
14+
### Contributors
15+
16+
Special thanks to our contributors (in alphabetical order): [Abderahman Moujahid](https://github.com/Abderahman88), [André Lage](https://github.com/aaclage).
17+
18+
## 1.21.0
19+
20+
### Fixes
21+
22+
- `TaxonomyPicker`: Ability to reset the TaxonomyPicker (Remove all selected Terms) [#367](https://github.com/pnp/sp-dev-fx-controls-react/issues/367)
23+
324
## 1.20.0
425

526
### New control(s)

docs/documentation/docs/about/release-notes.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
# Releases
22

3+
## 1.21.1
4+
5+
### Enhancements
6+
7+
- `ListView`: drag and drop [#711](https://github.com/pnp/sp-dev-fx-controls-react/pull/711)
8+
- `TaxonomyPicker`: control does not show an error message for an invalid/unresolved input [#728](https://github.com/pnp/sp-dev-fx-controls-react/issues/728)
9+
10+
### Fixes
11+
12+
- `RichText`: Fixing hyperlink issues [#708](https://github.com/pnp/sp-dev-fx-controls-react/pull/708)
13+
14+
### Contributors
15+
16+
Special thanks to our contributors (in alphabetical order): [Abderahman Moujahid](https://github.com/Abderahman88), [André Lage](https://github.com/aaclage).
17+
18+
## 1.21.0
19+
20+
### Fixes
21+
22+
- `TaxonomyPicker`: Ability to reset the TaxonomyPicker (Remove all selected Terms) [#367](https://github.com/pnp/sp-dev-fx-controls-react/issues/367)
23+
324
## 1.20.0
425

526
### New control(s)
16.9 KB
Loading

docs/documentation/docs/controls/ListView.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ This control renders a list view for the given set of items.
88

99
![ListView control with grouping](../assets/ListView-grouping.png)
1010

11+
**List view control with drag and drop applied**
12+
13+
![ListView control with grouping](../assets/ListView-DragDrop.png)
14+
1115
## How to use this control in your solutions
1216

1317
- 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.
@@ -30,7 +34,9 @@ import { ListView, IViewField, SelectionMode, GroupOrder, IGrouping } from "@pnp
3034
showFilter={true}
3135
defaultFilter="John"
3236
filterPlaceHolder="Search..."
33-
groupByFields={groupByFields} />
37+
groupByFields={groupByFields}
38+
dragDropFiles={true}
39+
onDrop={this._getDropFiles} />
3440
```
3541
- 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.
3642

@@ -61,6 +67,16 @@ const groupByFields: IGrouping[] = [
6167
!!! note "Extend ListView with a ContextualMenu"
6268
To extend the `ListView` control with a [ContextualMenu](https://developer.microsoft.com/en-us/fabric#/components/contextualmenu) refer to [ListView.ContextualMenu](./ListView.ContextualMenu.md).
6369

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+
6480
## Implementation
6581

6682
The ListView control can be configured with the following properties:
@@ -78,6 +94,7 @@ The ListView control can be configured with the following properties:
7894
| filterPlaceHolder | string | no | Specify the placeholder for the filter text box. Default 'Search' |
7995
| showFilter | boolean | no | Specify if the filter text box should be rendered. |
8096
| 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. |
8198

8299
The `IViewField` has the following implementation:
83100

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@pnp/spfx-controls-react",
33
"description": "Reusable React controls for SharePoint Framework solutions",
4-
"version": "1.20.0",
4+
"version": "1.21.1",
55
"engines": {
66
"node": ">=0.10.0"
77
},

src/common/telemetry/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const version: string = "1.20.0";
1+
export const version: string = "1.21.1";

src/controls/filePicker/FilePicker.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export class FilePicker extends React.Component<IFilePickerProps, IFilePickerSta
4646
this.fileSearchService = new FilesSearchService(props.context, this.props.bingAPIKey);
4747

4848
this.state = {
49-
panelOpen: false,
49+
panelOpen: this.props.isPanelOpen || false,
5050
organisationAssetsEnabled: false,
5151
showFullNav: true
5252
};
@@ -206,6 +206,9 @@ export class FilePicker extends React.Component<IFilePickerProps, IFilePickerSta
206206
* Closes the panel
207207
*/
208208
private _handleClosePanel = () => {
209+
if (this.props.onCancel) {
210+
this.props.onCancel();
211+
}
209212
this.setState({
210213
panelOpen: false
211214
});

0 commit comments

Comments
 (0)