Skip to content

Commit 66f0362

Browse files
committed
Merge branch 'dev'
2 parents 442607e + 8133890 commit 66f0362

File tree

12 files changed

+107
-40
lines changed

12 files changed

+107
-40
lines changed

CHANGELOG.JSON

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,30 @@
11
{
22
"versions": [
3+
{
4+
"version": "3.2.1",
5+
"changes": {
6+
"new": [],
7+
"enhancements": [],
8+
"fixes": [
9+
"`ListPicker`: `ListPicker` stopped working in upgrade from 3.1.0 to 3.2.0 [#945](https://github.com/pnp/sp-dev-fx-controls-react/issues/945)"
10+
]
11+
}
12+
},
13+
{
14+
"version": "3.3.0",
15+
"changes": {
16+
"new": [
17+
],
18+
"enhancements": [
19+
"`ListItemAttachments`: Add new label and description properties [#943](https://github.com/pnp/sp-dev-fx-controls-react/pull/943)"
20+
],
21+
"fixes": [
22+
"`ListItemAttachments`: Fixed multiple bugs [#943](https://github.com/pnp/sp-dev-fx-controls-react/pull/943)"
23+
]
24+
},
25+
"contributions": [
26+
]
27+
},
328
{
429
"version": "3.2.0",
530
"changes": {

CHANGELOG.md

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

3+
## 3.2.1
4+
5+
### Fixes
6+
7+
- `ListPicker`: `ListPicker` stopped working in upgrade from 3.1.0 to 3.2.0 [#945](https://github.com/pnp/sp-dev-fx-controls-react/issues/945)
8+
9+
## 3.3.0
10+
11+
### Enhancements
12+
13+
- `ListItemAttachments`: Add new label and description properties [#943](https://github.com/pnp/sp-dev-fx-controls-react/pull/943)
14+
15+
### Fixes
16+
17+
- `ListItemAttachments`: Fixed multiple bugs [#943](https://github.com/pnp/sp-dev-fx-controls-react/pull/943)
18+
319
## 3.2.0
420

521
### New control(s)

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

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

3+
## 3.2.1
4+
5+
### Fixes
6+
7+
- `ListPicker`: `ListPicker` stopped working in upgrade from 3.1.0 to 3.2.0 [#945](https://github.com/pnp/sp-dev-fx-controls-react/issues/945)
8+
9+
## 3.3.0
10+
11+
### Enhancements
12+
13+
- `ListItemAttachments`: Add new label and description properties [#943](https://github.com/pnp/sp-dev-fx-controls-react/pull/943)
14+
15+
### Fixes
16+
17+
- `ListItemAttachments`: Fixed multiple bugs [#943](https://github.com/pnp/sp-dev-fx-controls-react/pull/943)
18+
319
## 3.2.0
420

521
### New control(s)

docs/documentation/docs/controls/ListItemAttachments.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ The `ListItemAttachments` control can be configured with the following propertie
5959
| itemId | number | no | List Item Id |
6060
| listId | string | yes | Guid of the list. |
6161
| webUrl | string | no | URL of the site. By default it uses the current site URL. |
62+
| label | string | no | Main text to display on the placeholder, next to the icon. |
63+
| description | string | no | Description text to display on the placeholder, below the main text and icon. |
6264
| disabled | boolean | no | Specifies if the control is disabled or not. |
6365
| openAttachmentsInNewWindow | boolean | no | Specifies if the attachment should be openend in a separate browser tab. Use this property set to `true` if you plan to use the component in Microsoft Teams. |
6466

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": "3.2.0",
4+
"version": "3.2.1",
55
"scripts": {
66
"build": "gulp build",
77
"clean": "gulp clean",

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 = "3.2.0";
1+
export const version: string = "3.2.1";

src/controls/listItemAttachments/IListItemAttachmentsProps.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,12 @@ export interface IListItemAttachmentsProps {
88
disabled?: boolean;
99
context: BaseComponentContext;
1010
openAttachmentsInNewWindow?: boolean; // JJ - 20200613 - needed to support Microsoft Teams
11+
/**
12+
* Main text to display on the placeholder, next to the icon
13+
*/
14+
label?:string;
15+
/**
16+
* Description text to display on the placeholder, below the main text and icon
17+
*/
18+
description?:string;
1119
}
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11

22
export interface IUploadAttachmentState {
3-
file: any;
43
hideDialog: boolean;
54
dialogMessage: string;
65
isLoading: boolean;
7-
6+
87
}

src/controls/listItemAttachments/ListItemAttachments.tsx

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -120,22 +120,22 @@ export class ListItemAttachments extends React.Component<IListItemAttachmentsPro
120120
dialogMessage: strings.ListItemAttachmentserrorLoadAttachments.replace('{0}', error.message)
121121
});
122122
});
123-
}
124-
else if(this.state.filesToUpload && this.state.filesToUpload.length > 0){
125-
let files = this.state.filesToUpload.map(file=>({
126-
FileName: file.name,
127-
ServerRelativeUrl: undefined
128-
}));
129-
await this.loadAttachmentsPreview(files);
130-
}
131-
else{
132-
this.setState({
133-
fireUpload: false,
134-
hideDialog: true,
135-
dialogMessage: '',
136-
showPlaceHolder: true
137-
});
138-
}
123+
}
124+
else if(this.state.filesToUpload && this.state.filesToUpload.length > 0){
125+
let files = this.state.filesToUpload.map(file=>({
126+
FileName: file.name,
127+
ServerRelativeUrl: undefined
128+
}));
129+
await this.loadAttachmentsPreview(files);
130+
}
131+
else{
132+
this.setState({
133+
fireUpload: false,
134+
hideDialog: true,
135+
dialogMessage: '',
136+
showPlaceHolder: true
137+
});
138+
}
139139
}
140140

141141
/**
@@ -255,8 +255,8 @@ export class ListItemAttachments extends React.Component<IListItemAttachmentsPro
255255
this.state.showPlaceHolder ?
256256
<Placeholder
257257
iconName='Upload'
258-
iconText={strings.ListItemAttachmentslPlaceHolderIconText}
259-
description={strings.ListItemAttachmentslPlaceHolderDescription}
258+
iconText={this.props.label || strings.ListItemAttachmentslPlaceHolderIconText}
259+
description={this.props.description || strings.ListItemAttachmentslPlaceHolderDescription}
260260
buttonLabel={strings.ListItemAttachmentslPlaceHolderButtonLabel}
261261
hideButton={this.props.disabled}
262262
onConfigure={() => this.setState({ fireUpload: true })} />
@@ -304,7 +304,7 @@ export class ListItemAttachments extends React.Component<IListItemAttachmentsPro
304304
</div>
305305
);
306306
})}
307-
{
307+
{ !this.state.hideDialog &&
308308

309309
<Dialog
310310
hidden={this.state.hideDialog}

0 commit comments

Comments
 (0)