Skip to content

Commit 5e1531e

Browse files
authored
Merge pull request #940 from pnp/v2-dev
Merge for 2.8.0
2 parents 0d856aa + a57553a commit 5e1531e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+2357
-120
lines changed

CHANGELOG.JSON

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
11
{
22
"versions": [
3+
{
4+
"version": "2.8.0",
5+
"changes": {
6+
"new": [
7+
"`DynamicForm`: New Control: Dynamic form [#878](https://github.com/pnp/sp-dev-fx-controls-react/issues/878)",
8+
"`LocationPicker`: New Control - Location Picker [#915](https://github.com/pnp/sp-dev-fx-controls-react/issues/915)"
9+
],
10+
"enhancements": [
11+
"`ComboBoxListItemPicker` and `ListItemPicker`: Add label to control [#910](https://github.com/pnp/sp-dev-fx-controls-react/pull/910)",
12+
"`PeoplePicker`: new property `groupId`. [#917](https://github.com/pnp/sp-dev-fx-controls-react/pull/917)"
13+
],
14+
"fixes": [
15+
"`SitePicker`: `SitePicker` does not display initial sites until you click the dropdown to select [#895](https://github.com/pnp/sp-dev-fx-controls-react/issues/895)",
16+
"`FilePicker`: invalid CSS: relative in quotes. [#930](https://github.com/pnp/sp-dev-fx-controls-react/pull/930)",
17+
"`FieldCollectionData`: FieldCollectionData is not setting sortIdx on resulting collection when using 'Add and Save' [#929](https://github.com/pnp/sp-dev-fx-controls-react/issues/929)"
18+
]
19+
},
20+
"contributions": [
21+
"[Nikolay Belykh](https://github.com/nbelyh)",
22+
"[Patrik Hellgren](https://github.com/patrikhellgren)",
23+
"[Peter Paul Kirschner](https://github.com/petkir)",
24+
"[Ravichandran Krishnasamy](https://github.com/ravichandran-blog)"
25+
]
26+
},
327
{
428
"version": "2.7.0",
529
"changes": {

CHANGELOG.md

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

3+
## 2.8.0
4+
5+
### New control(s)
6+
7+
- `DynamicForm`: New Control: Dynamic form [#878](https://github.com/pnp/sp-dev-fx-controls-react/issues/878)
8+
- `LocationPicker`: New Control - Location Picker [#915](https://github.com/pnp/sp-dev-fx-controls-react/issues/915)
9+
10+
### Enhancements
11+
12+
- `ComboBoxListItemPicker` and `ListItemPicker`: Add label to control [#910](https://github.com/pnp/sp-dev-fx-controls-react/pull/910)
13+
- `PeoplePicker`: new property `groupId`. [#917](https://github.com/pnp/sp-dev-fx-controls-react/pull/917)
14+
15+
### Fixes
16+
17+
- `SitePicker`: `SitePicker` does not display initial sites until you click the dropdown to select [#895](https://github.com/pnp/sp-dev-fx-controls-react/issues/895)
18+
- `FilePicker`: invalid CSS: relative in quotes. [#930](https://github.com/pnp/sp-dev-fx-controls-react/pull/930)
19+
- `FieldCollectionData`: FieldCollectionData is not setting sortIdx on resulting collection when using 'Add and Save' [#929](https://github.com/pnp/sp-dev-fx-controls-react/issues/929)
20+
21+
### Contributors
22+
23+
Special thanks to our contributors (in alphabetical order): [Nikolay Belykh](https://github.com/nbelyh), [Patrik Hellgren](https://github.com/patrikhellgren), [Peter Paul Kirschner](https://github.com/petkir), [Ravichandran Krishnasamy](https://github.com/ravichandran-blog).
24+
325
## 2.7.0
426

527
### New control(s)

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

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

3+
## 2.8.0
4+
5+
### New control(s)
6+
7+
- `DynamicForm`: New Control: Dynamic form [#878](https://github.com/pnp/sp-dev-fx-controls-react/issues/878)
8+
- `LocationPicker`: New Control - Location Picker [#915](https://github.com/pnp/sp-dev-fx-controls-react/issues/915)
9+
10+
### Enhancements
11+
12+
- `ComboBoxListItemPicker` and `ListItemPicker`: Add label to control [#910](https://github.com/pnp/sp-dev-fx-controls-react/pull/910)
13+
- `PeoplePicker`: new property `groupId`. [#917](https://github.com/pnp/sp-dev-fx-controls-react/pull/917)
14+
15+
### Fixes
16+
17+
- `SitePicker`: `SitePicker` does not display initial sites until you click the dropdown to select [#895](https://github.com/pnp/sp-dev-fx-controls-react/issues/895)
18+
- `FilePicker`: invalid CSS: relative in quotes. [#930](https://github.com/pnp/sp-dev-fx-controls-react/pull/930)
19+
- `FieldCollectionData`: FieldCollectionData is not setting sortIdx on resulting collection when using 'Add and Save' [#929](https://github.com/pnp/sp-dev-fx-controls-react/issues/929)
20+
21+
### Contributors
22+
23+
Special thanks to our contributors (in alphabetical order): [Nikolay Belykh](https://github.com/nbelyh), [Patrik Hellgren](https://github.com/patrikhellgren), [Peter Paul Kirschner](https://github.com/petkir), [Ravichandran Krishnasamy](https://github.com/ravichandran-blog).
24+
325
## 2.7.0
426

527
### New control(s)
108 KB
Loading
18.6 KB
Loading
3.8 KB
Loading
3.63 KB
Loading

docs/documentation/docs/controls/ComboBoxListItemPicker.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,5 +122,6 @@ The `ComboBoxListItemPicker` control can be configured with the following proper
122122
| multiSelect | boolean | no | Allows multiple selection|
123123
| onInitialized | () => void | no | Calls when component is ready|
124124
| itemLimit | number | no | Maximum number of items to be displayed in the combobox. Default: 100 |
125+
| label | string | no | Specifies the text describing the combobox ListItemPicker. |
125126

126127
![](https://telemetry.sharepointpnp.com/sp-dev-fx-controls-react/wiki/controls/ComboBoxListItemPicker)
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Dynamic Form
2+
3+
This control can dynamically generate SharePoint list or SharePoint document library form and everything controlled through list setting.
4+
5+
## How to use this control in your solutions
6+
7+
- 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.
8+
- Import the following modules to your component:
9+
10+
```TypeScript
11+
import { DynamicForm } from "fx-controls-react/lib/DynamicForm";
12+
```
13+
14+
- Use the DynamicForm control in your code as follows:
15+
16+
```jsx
17+
<DynamicForm
18+
context={this.props.context}
19+
listId={"3071c058-549f-461d-9d73-8b9a52049a80"}
20+
listItemId={1}>
21+
onCancelled={() => { console.log('Cancelled') }}
22+
onBeforeSubmit={(async listItem) => { return true; }}
23+
onSubmitError={(listItem, error) => { alert(error.message); }}
24+
onSubmitted={async (listItemData) => { console.log(listItemData); }}>
25+
</DynamicForm>
26+
```
27+
![DynamicForm](../assets/DynamicForm.png)
28+
29+
## Implementation
30+
31+
The `DynamicForm` can be configured with the following properties:
32+
33+
| Property | Type | Required | Description |
34+
| ---- | ---- | ---- | ---- |
35+
| context | WebPartContext or ExtensionContext | yes | The context object of the SPFx loaded webpart or customizer. |
36+
| listId | string | yes | Guid of the list.|
37+
| listItemId | number | no | list item ID. |
38+
| contentTypeId | string | no | content type ID |
39+
| disabled | boolean | no | Option allow to be enable or disable. Default value is `false`|
40+
| onBeforeSubmit | (listItemData: any) => Promise&lt;boolean&gt; | no | Before submit handler. Allows to modify the object to be submitted or cancel the submission. |
41+
| onSubmitted | (listItem: any) => void | no | Method that returns listItem data JSON object. |
42+
| onSubmitError | (listItemData: any, error: Error) => void | no | Handler of submission error. |
43+
| onCancelled | () => void | no | Handler when form has been cancelled. |

docs/documentation/docs/controls/ListItemPicker.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,6 @@ The `ListItemPicker` control can be configured with the following properties:
6464
| orderBy | string | no | condition to order by list Item, same as $orderby ODATA parameter|
6565
| placeholder | string | no | Short text hint to display in empty picker |
6666
| substringSearch | boolean | no | Specifies if substring search should be used |
67+
| label | string | no | Specifies the text describing the ListItemPicker. |
6768

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

0 commit comments

Comments
 (0)