Skip to content

Commit 92a0e39

Browse files
committed
merge with dev
2 parents d6890f1 + cea1fba commit 92a0e39

File tree

21 files changed

+215
-83
lines changed

21 files changed

+215
-83
lines changed

CHANGELOG.JSON

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,22 @@
66
"new": [],
77
"enhancements": [
88
"`TreeView`: Adding support to clear TreeView selected items by passing an empty array. [#787](https://github.com/pnp/sp-dev-fx-controls-react/pull/787)",
9-
"`FilePicker`: new property `includePageLibraries` to optionally display Site Pages library on Site tab [#601](https://github.com/pnp/sp-dev-fx-controls-react/issues/601)"
9+
"`FilePicker`: new property `includePageLibraries` to optionally display Site Pages library on Site tab [#601](https://github.com/pnp/sp-dev-fx-controls-react/issues/601)",
10+
"`ListItemPicker`: Support of `Calculated` columns [#805](https://github.com/pnp/sp-dev-fx-controls-react/issues/805)",
11+
"`Progress`: Documentation update to have consistency in variables names [#811](https://github.com/pnp/sp-dev-fx-controls-react/pull/811)",
12+
"`FolderExplorer`: Add support for sorting folder explorer items [#812](https://github.com/pnp/sp-dev-fx-controls-react/pull/812)"
1013
],
1114
"fixes": [
1215
"`ListView`: Selection is reset when putting a ListView inside a React Component that controls its items and selection props [#251](https://github.com/pnp/sp-dev-fx-controls-react/issues/251)",
1316
"Documentation fix for `PeoplePicker`: Removed unwanted new line in help content. [#783](https://github.com/pnp/sp-dev-fx-controls-react/pull/783)",
1417
"Documentation fix for `TreeView`: `TreeViewSelectionMode` added in the import [#780](https://github.com/pnp/sp-dev-fx-controls-react/pull/780)",
1518
"Documentation fix for `TreeView`: removed unwanted comma [#779](https://github.com/pnp/sp-dev-fx-controls-react/pull/779)",
16-
"`ListView`: When the items reach the number of items more than can be shown on a page/component, it adds horizontal scroll instead of vertical [#648](https://github.com/pnp/sp-dev-fx-controls-react/issues/648)"
19+
"`IFrameDialog`: height unable to resize relative to screen size, even if we provide in % it is taking default value. [#636](https://github.com/pnp/sp-dev-fx-controls-react/issues/636)",
20+
"`DateTimePicker`: Clear Date functionality [#799](https://github.com/pnp/sp-dev-fx-controls-react/issues/799)"
1721
]
1822
},
1923
"contributions": [
24+
"[Ari Gunawan](https://github.com/AriGunawan)",
2025
"[Joel Rodrigues](https://github.com/joelfmrodrigues)",
2126
"[Mike Myers](https://github.com/thespooler)",
2227
"[Ravichandran Krishnasamy](https://github.com/ravichandran-blog)",

CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,22 @@
66

77
- `TreeView`: Adding support to clear TreeView selected items by passing an empty array. [#787](https://github.com/pnp/sp-dev-fx-controls-react/pull/787)
88
- `FilePicker`: new property `includePageLibraries` to optionally display Site Pages library on Site tab [#601](https://github.com/pnp/sp-dev-fx-controls-react/issues/601)
9+
- `ListItemPicker`: Support of `Calculated` columns [#805](https://github.com/pnp/sp-dev-fx-controls-react/issues/805)
10+
- `Progress`: Documentation update to have consistency in variables names [#811](https://github.com/pnp/sp-dev-fx-controls-react/pull/811)
11+
- `FolderExplorer`: Add support for sorting folder explorer items [#812](https://github.com/pnp/sp-dev-fx-controls-react/pull/812)
912

1013
### Fixes
1114

1215
- `ListView`: Selection is reset when putting a ListView inside a React Component that controls its items and selection props [#251](https://github.com/pnp/sp-dev-fx-controls-react/issues/251)
1316
- Documentation fix for `PeoplePicker`: Removed unwanted new line in help content. [#783](https://github.com/pnp/sp-dev-fx-controls-react/pull/783)
1417
- Documentation fix for `TreeView`: `TreeViewSelectionMode` added in the import [#780](https://github.com/pnp/sp-dev-fx-controls-react/pull/780)
1518
- Documentation fix for `TreeView`: removed unwanted comma [#779](https://github.com/pnp/sp-dev-fx-controls-react/pull/779)
16-
- `ListView`: When the items reach the number of items more than can be shown on a page/component, it adds horizontal scroll instead of vertical [#648](https://github.com/pnp/sp-dev-fx-controls-react/issues/648)
19+
- `IFrameDialog`: height unable to resize relative to screen size, even if we provide in % it is taking default value. [#636](https://github.com/pnp/sp-dev-fx-controls-react/issues/636)
20+
- `DateTimePicker`: Clear Date functionality [#799](https://github.com/pnp/sp-dev-fx-controls-react/issues/799)
1721

1822
### Contributors
1923

20-
Special thanks to our contributors (in alphabetical order): [Joel Rodrigues](https://github.com/joelfmrodrigues), [Mike Myers](https://github.com/thespooler), [Ravichandran Krishnasamy](https://github.com/ravichandran-blog), [San](https://github.com/sankarkumar23).
24+
Special thanks to our contributors (in alphabetical order): [Ari Gunawan](https://github.com/AriGunawan), [Joel Rodrigues](https://github.com/joelfmrodrigues), [Mike Myers](https://github.com/thespooler), [Ravichandran Krishnasamy](https://github.com/ravichandran-blog), [San](https://github.com/sankarkumar23).
2125

2226
## 2.4.0
2327

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
![SharePoint Patterns and Practices](https://devofficecdn.azureedge.net/media/Default/PnP/sppnp.png)
2-
31
# SharePoint Framework React Controls
42

53
This is a open source library that shares a set of reusable React control that can be used in your SharePoint Framework solutions.

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,22 @@
66

77
- `TreeView`: Adding support to clear TreeView selected items by passing an empty array. [#787](https://github.com/pnp/sp-dev-fx-controls-react/pull/787)
88
- `FilePicker`: new property `includePageLibraries` to optionally display Site Pages library on Site tab [#601](https://github.com/pnp/sp-dev-fx-controls-react/issues/601)
9+
- `ListItemPicker`: Support of `Calculated` columns [#805](https://github.com/pnp/sp-dev-fx-controls-react/issues/805)
10+
- `Progress`: Documentation update to have consistency in variables names [#811](https://github.com/pnp/sp-dev-fx-controls-react/pull/811)
11+
- `FolderExplorer`: Add support for sorting folder explorer items [#812](https://github.com/pnp/sp-dev-fx-controls-react/pull/812)
912

1013
### Fixes
1114

1215
- `ListView`: Selection is reset when putting a ListView inside a React Component that controls its items and selection props [#251](https://github.com/pnp/sp-dev-fx-controls-react/issues/251)
1316
- Documentation fix for `PeoplePicker`: Removed unwanted new line in help content. [#783](https://github.com/pnp/sp-dev-fx-controls-react/pull/783)
1417
- Documentation fix for `TreeView`: `TreeViewSelectionMode` added in the import [#780](https://github.com/pnp/sp-dev-fx-controls-react/pull/780)
1518
- Documentation fix for `TreeView`: removed unwanted comma [#779](https://github.com/pnp/sp-dev-fx-controls-react/pull/779)
16-
- `ListView`: When the items reach the number of items more than can be shown on a page/component, it adds horizontal scroll instead of vertical [#648](https://github.com/pnp/sp-dev-fx-controls-react/issues/648)
19+
- `IFrameDialog`: height unable to resize relative to screen size, even if we provide in % it is taking default value. [#636](https://github.com/pnp/sp-dev-fx-controls-react/issues/636)
20+
- `DateTimePicker`: Clear Date functionality [#799](https://github.com/pnp/sp-dev-fx-controls-react/issues/799)
1721

1822
### Contributors
1923

20-
Special thanks to our contributors (in alphabetical order): [Joel Rodrigues](https://github.com/joelfmrodrigues), [Mike Myers](https://github.com/thespooler), [Ravichandran Krishnasamy](https://github.com/ravichandran-blog), [San](https://github.com/sankarkumar23).
24+
Special thanks to our contributors (in alphabetical order): [Ari Gunawan](https://github.com/AriGunawan), [Joel Rodrigues](https://github.com/joelfmrodrigues), [Mike Myers](https://github.com/thespooler), [Ravichandran Krishnasamy](https://github.com/ravichandran-blog), [San](https://github.com/sankarkumar23).
2125

2226
## 2.4.0
2327

docs/documentation/docs/controls/FolderExplorer.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,7 @@ The `FolderExplorer` control can be configured with the following properties:
5959
| initialBreadcrumbItems | IBreadcrumbItem | no | Additional items to be added to the beginning of the breadcrumb. |
6060
| hiddenFilterBox | boolean | no | Hide the filter box |
6161
| onSelect | (folder: IFolder): void | no | Callback function called after a folder is selected. |
62+
| orderby | string | no | The name of the field on which to sort. Default: Name. For list item properties, use ListItemAllFields/Title, ListItemAllFields/Created, etc |
63+
| orderAscending | boolean | no | If set to true, results will be sorted in ascending order. Otherwise, descending will be used as default |
6264

6365
![](https://telemetry.sharepointpnp.com/sp-dev-fx-controls-react/wiki/controls/FolderExplorer)

docs/documentation/docs/controls/Progress.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ Now, in a component, where `Progress` is used you can have code as below:
6363

6464
```TypeScript
6565
export interface IYourComponentState {
66-
actions: IProgressAction[];
67-
currentActionIndex?: number;
66+
progressActions: IProgressAction[];
67+
currentProgressActionIndex?: number;
6868
// other state properties
6969
}
7070

@@ -75,7 +75,7 @@ export class YourComponent extends React.Component<IYourComponentProps, IYourCom
7575

7676
private _initActions() {
7777
this.setState({
78-
actions: [
78+
progressActions: [
7979
new FirstAction(),
8080
new SecondAction()
8181
]
@@ -84,7 +84,7 @@ export class YourComponent extends React.Component<IYourComponentProps, IYourCom
8484

8585
private async _execute() {
8686
for (let i = 0; i <= this.state.actions.length; i++) {
87-
this.setState(currentActionIndex: i);
87+
this.setState(currentProgressActionIndex: i);
8888

8989
if (i < this.state.actions.length) {
9090
await this.state.actions[i].execute();

src/common/SPEntities.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ export interface ISPField {
2323
RichText?: boolean;
2424
SchemaXml?: string;
2525
LookupDisplayUrl?: string;
26+
TypeAsString?: string;
27+
ResultType?: string;
2628
}
2729

2830
/**
@@ -166,4 +168,4 @@ export interface ICultureInfo {
166168
name: string;
167169
dateTimeFormat: ICultureDateTimeFormat;
168170
numberFormat: ICultureNumberFormat;
169-
}
171+
}

src/controls/dateTimePicker/DateTimePicker.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export class DateTimePicker extends React.Component<IDateTimePickerProps, IDateT
6969
* Called before the component receives new props, used for matching state with new props.
7070
*/
7171
public componentWillReceiveProps(nextProps: IDateTimePickerProps): void {
72-
if (nextProps.value != null && !isEqual(nextProps.value, this.props.value)) {
72+
if (!isEqual(nextProps.value, this.props.value)) {
7373
const { day, hours, minutes, seconds } = DateTimePicker.getDateComponents(nextProps.value, this.props.dateConvention);
7474
this.setState({ day, hours, minutes, seconds });
7575
}
@@ -134,9 +134,9 @@ export class DateTimePicker extends React.Component<IDateTimePickerProps, IDateT
134134
}
135135
}
136136
else if (hours === 12) {
137-
//am - if hours == 12, set hours to 0 here
138-
hours = 0;
139-
}
137+
//am - if hours == 12, set hours to 0 here
138+
hours = 0;
139+
}
140140
}
141141

142142
if (hours > 23) {

src/controls/folderExplorer/FolderExplorer/FolderExplorer.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,9 @@ export class FolderExplorer extends React.Component<IFolderExplorerProps, IFolde
166166
}
167167
} else {
168168
// library/folder level, get folders
169-
this._allFolders = await this._spService.GetFolders(siteAbsoluteUrl, folder.ServerRelativeUrl);
169+
const orderBy = this.props.orderby !== undefined ? this.props.orderby : 'Name';
170+
const orderAscending = this.props.orderAscending !== undefined ? this.props.orderAscending : true;
171+
this._allFolders = await this._spService.GetFolders(siteAbsoluteUrl, folder.ServerRelativeUrl, orderBy, orderAscending);
170172
}
171173
this.setState({ folders: this._allFolders, selectedFolder: folder, foldersLoading: false });
172174

src/controls/folderExplorer/FolderExplorer/IFolderExplorerProps.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,16 @@ export interface IFolderExplorerProps {
4646
*/
4747
hiddenFilterBox?: boolean;
4848

49+
/**
50+
* The name of the field on which to sort. Default: Name. For list item properties, use ListItemAllFields/Title, ListItemAllFields/Created, etc
51+
*/
52+
orderby?: string;
53+
54+
/**
55+
* If set to true, results will be sorted in ascending order. Otherwise, descending will be used as default
56+
*/
57+
orderAscending?: boolean;
58+
4959
/**
5060
* Callback function called after a folder is selected
5161
* @argument folder The selected folder

0 commit comments

Comments
 (0)