Updated sample.json and readme

This commit is contained in:
Hugo Bernier 2022-09-05 23:25:55 -04:00
parent b9618618ca
commit 34795cc62b
3 changed files with 576 additions and 570 deletions

View File

@ -71,6 +71,7 @@ You'll need to connect to a list before you can use this sample.
| 1.0.8 | February 7, 2021 | Fixed dragging and dropping fields | | 1.0.8 | February 7, 2021 | Fixed dragging and dropping fields |
| 1.0.9 | February 19, 2021 | Fixed regular expressions for text validation | | 1.0.9 | February 19, 2021 | Fixed regular expressions for text validation |
| 1.0.10 | May 6, 2021 | Fixed "attachments are not cleared after submit" issue | | 1.0.10 | May 6, 2021 | Fixed "attachments are not cleared after submit" issue |
| 1.0.11 | Sept 5, 2022 | Fixed DateField does not support manually entering date |
## Minimal Path to Awesome ## Minimal Path to Awesome

View File

@ -5,7 +5,7 @@
"url": "https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-list-form", "url": "https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-list-form",
"title": "List Form Web Part", "title": "List Form Web Part",
"creationDateTime": "2017-11-24", "creationDateTime": "2017-11-24",
"updateDateTime": "2021-02-19", "updateDateTime": "2022-09-05",
"shortDescription": "The React List Form web part is a web part for adding a list form to any page. It provides a working example of implementing generic SharePoint list forms using the SharePoint Framework (SPFx) and the React and Office UI Fabric libraries.", "shortDescription": "The React List Form web part is a web part for adding a list form to any page. It provides a working example of implementing generic SharePoint list forms using the SharePoint Framework (SPFx) and the React and Office UI Fabric libraries.",
"longDescription": [ "longDescription": [
"The React List Form web part is a web part for adding a list form to any page. It provides a working example of implementing generic SharePoint list forms using the SharePoint Framework (SPFx) and the React and Office UI Fabric libraries." "The React List Form web part is a web part for adding a list form to any page. It provides a working example of implementing generic SharePoint list forms using the SharePoint Framework (SPFx) and the React and Office UI Fabric libraries."
@ -71,6 +71,11 @@
"name": "Ari Gunawan", "name": "Ari Gunawan",
"company": "", "company": "",
"pictureUrl": "https://github.com/AriGunawan.png" "pictureUrl": "https://github.com/AriGunawan.png"
},
{
"gitHubAccount": "alicelupsan",
"name": "alicelupsan",
"pictureUrl": "https://github.com/alicelupsan.png"
} }
], ],
"references": [] "references": []

View File

@ -300,7 +300,7 @@ class ListForm extends React.Component<IListFormProps, IListFormState> {
const data = this.state.fieldsSchema const data = this.state.fieldsSchema
.reduce((newData, fld) => { .reduce((newData, fld) => {
if (fld.DefaultValue && fld.FieldType.indexOf("TaxonomyField") > -1) { if (fld.DefaultValue && fld.FieldType.indexOf("TaxonomyField") > -1) {
newData[fld.InternalName] = fld.DefaultValue.replace(new RegExp("([#][0-9]+;#|^[0-9]+;#)", "g"), "") newData[fld.InternalName] = fld.DefaultValue.replace(new RegExp("([#][0-9]+;#|^[0-9]+;#)", "g"), "");
} else { } else {
newData[fld.InternalName] = fld.DefaultValue; newData[fld.InternalName] = fld.DefaultValue;
} }